setNativeHeap

fun setNativeHeap(proxy: Proxy, owned: Boolean)(source)

Configures the memory to be freed from the native heap.

This method is useful when your Proxy object points to memory allocated directly on the Kotlin/Native heap via nativeHeap.alloc or similar methods.

By default, it also marks the memory as owned (owned = true).

Parameters

proxy

The Proxy instance representing the allocated memory.

owned

Whether the memory should be owned (default is true).