GemNativeObj

abstract class GemNativeObj

This is used by all Kotlin SDK objects that keeps a native implementation. For example In native you can obtain the native address of an kotlin object that extends this class by simply calling getNativeAddress(env, this_jObject); see JNIGemNativeObj.h

Inheritors

Constructors

Link copied to clipboard
constructor()

Default constructor uses nativeAlloc by default

constructor(address: Long)
constructor(address: Long, isReference: Boolean?)

Constructor for already nave allocated objects

constructor(allocator: ObjectAllocator, isReference: Boolean = false)

Constructor for custom native allocation

Types

Link copied to clipboard
object Companion

GemNativeObj companion

Properties

Link copied to clipboard

Address of native referenced object. nullptr if not referencing any native allocated object. Note native allocation will happen only once.

Functions

Link copied to clipboard
fun finalize()

Overrides finalize that garbage collector will call when needed.

Link copied to clipboard

True if keeps a reference to a C++ SDK object False if keeps a C++ SDK object

Link copied to clipboard
operator fun not(): Boolean

Checks if this object is valid.

Link copied to clipboard
fun release()

Releases the native referenced value of this object if: