Having a CPointer (obtained from StableRef) as an ...
# kotlin-native
b
Having a CPointer (obtained from StableRef) as an Int how can i convert it back to StableRef to dispose it?
m
.asStableRef<T>().get()
b
Are you sure Int has this extension function?
m
well, then
.toLong().toCPointer<T>().asStableRef<T>().get()
b
Thanks. Is T param important if i want to just dispose of stable ref?
m
I don't know, maybe in your usecase it can be omted.
b
Could you briefly explain why it's needed and how it's used?
b
That's great help. Thanks!