Skip to main content

Interface: Choreographer

Extends

  • PointerHolder

Properties

isValid

readonly isValid: boolean

Get if the refernce to the native pointer is still valid and strong.

If this is false, this object has been manually released with release() and all other methods on this object will throw an Error.

Inherited from

PointerHolder.isValid

Defined in

src/types/PointerHolder.ts:37

Methods

addFrameCallbackListener()

addFrameCallbackListener(callback): Listener

Parameters

callback: RenderCallback

Returns

Listener

Defined in

src/types/Choreographer.ts:26


release()

release(): void

Manually release this reference to the native pointer. This will ensure that JS will no longer hold a strong reference, and memory can be safely cleaned up.

If the native pointer is still referenced elsewhere in native code, the underlying memory will not be deleted unless the other references are also released.

If this is not called, the memory will only be cleaned once the JS gabage collector decides to delete this object, which might be at any point in the future.

Calling release() is not required as the GC will destroy this object eventually anyways, but it is recommended to optimize memory usage.

After manually releasing a pointer, all future methods on this object will throw an Error.

Returns

void

Inherited from

PointerHolder.release

Defined in

src/types/PointerHolder.ts:30


start()

start(): void

Returns

void

Defined in

src/types/Choreographer.ts:24


stop()

stop(): void

Returns

void

Defined in

src/types/Choreographer.ts:25