How do I allocate a pointer to pass in c function ...
# kotlin-native
b
How do I allocate a pointer to pass in c function to store the result at? I am aware about
memScoped { val result = alloc<T>() }
, but with that the pointer is gone as soon as memScoped returns and I neet to keep reference to that pointer afer it treturns.
Figured it out -
val reply = nativeHeap.alloc<bson_t>()
docs