RefCounted

A non-atomic reference counted resource. Objects implementing this interface should have exterior locking if used as shared.

Members

Functions

dispose
void dispose()
Undocumented in source.
rcLock
RefCounted rcLock()

Get a copy of this RefCounted instance if the refCount >= 1. This increases the refCount by 1. This should only be used to keep weak reference and ensures that the resource is not disposed.

release
void release()

Decrement the reference count and dispose if it reaches zero.

retain
void retain()

Increment the reference count.

Properties

refCount
size_t refCount [@property getter]

The number of active references

Inherited Members

From Disposable

dispose
void dispose()

Dispose the underlying resource

Meta