Home > rc-js-util > IReferenceCountedPtr
Wrapper of wasm object. NB The object is pre-claimed (ref count 1) on creation. On free the pointer will be set to null.
Signature:
export interface IReferenceCountedPtr extends IReferenceCounted
Extends: IReferenceCounted
Property | Modifiers | Type | Description |
---|---|---|---|
isStatic | boolean |
Method | Description |
---|---|
bindLifecycle(referenceCountedObject) | Claims the referenceCountedObject and releases when this object is released. |
getPtr() | |
registerOnFreeListener(callback) | Callback will be called when the reference count hits 0. Useful for cleanup. |
takeOwnership(referenceCountedObject) | Releases the referenceCountedObject when this object is released. |
unbindLifecycle(referenceCountedObject) | Releases claim on the referenceCountedObject . |
unbindLifecycles(referenceCountedObjects) | Releases claims on the referenceCountedObjects . |