Small tweaks in DetachedObjectGraph docs.

This commit is contained in:
Nikolay Igotti
2019-05-23 17:30:05 +03:00
parent 479c91d880
commit 31df1ddc52
@@ -62,7 +62,7 @@ public class DetachedObjectGraph<T> internal constructor(pointer: NativePtr) {
: this(detachObjectGraphInternal(mode.value, producer as () -> Any?)) : this(detachObjectGraphInternal(mode.value, producer as () -> Any?))
/** /**
* Creates detached object graph from value stored earlier in a C raw pointer. * Restores detached object graph from the value stored earlier in a C raw pointer.
*/ */
public constructor(pointer: COpaquePointer?) : this(pointer?.rawValue ?: NativePtr.NULL) public constructor(pointer: COpaquePointer?) : this(pointer?.rawValue ?: NativePtr.NULL)
@@ -74,8 +74,9 @@ public class DetachedObjectGraph<T> internal constructor(pointer: NativePtr) {
/** /**
* Attaches previously detached object subgraph created by [DetachedObjectGraph]. * Attaches previously detached object subgraph created by [DetachedObjectGraph].
* Please note, that once object graph is attached, the [DetachedObjectGraph.stable] pointer does not have sense anymore, * Please note, that once object graph is attached, the [DetachedObjectGraph.stable] pointer does not
* and shall be discarded. * make sense anymore, and shall be discarded, so attach of one DetachedObjectGraph object can only
* happen once.
*/ */
public inline fun <reified T> DetachedObjectGraph<T>.attach(): T { public inline fun <reified T> DetachedObjectGraph<T>.attach(): T {
var rawStable: NativePtr var rawStable: NativePtr