inline class StableRef<out T : Any>
This class provides a way to create a stable handle to any Kotlin object. After converting to CPointer it can be safely passed to native code e.g. to be received in a Kotlin callback.
val value: COpaquePointer
Converts the handle to C pointer.
fun asCPointer(): COpaquePointer
Disposes the handle. It must not be used after that.
fun dispose()
Creates a handle for given object.
fun <T : Any> create(any: T): StableRef<T>
© 2010–2019 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlinx.cinterop/-stable-ref/index.html