DetachedObjectGraph

constructor(mode: TransferMode = TransferMode.SAFE, producer: () -> T)(source)

Creates stable pointer to object, ensuring associated object subgraph is disjoint in specified mode (TransferMode.SAFE by default). Raw value returned by asCPointer could be stored to a C variable or passed to another Kotlin machine.


constructor(pointer: COpaquePointer?)(source)

Restores detached object graph from the value stored earlier in a C raw pointer.