allocate

Allocate memory and instantiate a wrapper instance of this record type on the native heap.

The return value is wrapped in a RecordRef and RecordRef.free should be called on it once you are done and the memory can be deallocated.

See also


inline fun <COMPANION : RecordCompanion<TYPE, STRUCT>, TYPE : Record, STRUCT> COMPANION.allocate(scope: <Error class: unknown class>): TYPE

Allocate memory and instantiate a wrapper instance of this record in the given MemScope

The return value is bound to the given scope and will be automatically freed once the scope ends.

See also

MemScope