backed by native C memory without a copy in Kotlin/Native?
➕ 2
d
Dominaezzz
09/30/2020, 8:15 PM
It is. What are you trying to achieve? Have you tried
usePinned
?
t
travis
09/30/2020, 10:22 PM
usePinned
is the common example, but it involves a memory copy.
https://stackoverflow.com/a/58521109
Wondering if there is something similar to Javascript interop (whereas a
was mostly just trying to avoid a copy (and was curious if I was missing something). Something like JNI DirectByteBuffers. I think I can achieve what I want though by just introducing a
Buffer
interface and then wrap the native memory. Little more work but should achieve what I want.