js-util

Home > rc-js-util > IReferenceCountedPtr > takeOwnership

IReferenceCountedPtr.takeOwnership() method

Releases the referenceCountedObject when this object is released.

Signature:

takeOwnership(referenceCountedObject: IReferenceCountedPtr): void;

Parameters

Parameter Type Description
referenceCountedObject IReferenceCountedPtr  

Returns:

void

Remarks

The difference with bindLifecycle is that this does not increment the reference count, to be used where the object is being passed off as opposed to shared.