Okay, and I can't get around that by managing the ...
# kotlin-native
a
Okay, and I can't get around that by managing the memory for those objects myself? (e.g. in the snippet above I attempted to
alloc
a long on the heap)
o
You can pass pointers to C heap data to threads, as in regular C. For more Kotlin way to pass object references, workers could be used, see samples.
a
"You can pass pointers to C heap data to threads" That's exactly what I was trying to do in the code I posted? Or do I need to malloc it from C code and it's not enough to use nativeHeap.alloc?
o
It should be enough, maybe you freed it too early