caffeine
03/14/2021, 11:15 AMclass Buffer(val capacity:Int){private val mem = ByteArray(capacity); val ptr = mem.refTo(0);} variable ptr will be stable? Can I use value of ptr during all object life cycle?caffeine
03/14/2021, 11:26 AMpin in init block on my instance of ByteArray and never call unpin()Dominaezzz
03/14/2021, 12:50 PMDominaezzz
03/14/2021, 12:51 PMptr is stable to use in Kotlin but won't be stable when passed to the native side. It must be pinned for that.