Utility class. More...
#include <ilviews/dataccess/refcount.h>
Public Member Functions | |
IlInt | getRefCount () const |
Returns the reference count of the object. Initially, this property is set to 0 . More... | |
void | lock () const |
Increments the reference count of the object. | |
void | unLock () const |
Decrements the reference count of the object. More... | |
Protected Member Functions | |
virtual | ~IliRefCounted () |
This is the virtual destructor of the IliRefCounted class. More... | |
Utility class.
Library: dataccess
This class is used as a base class for objects whose lifetime is managed by a reference count. Such objects are never explicitly deleted.
|
protectedvirtual |
This is the virtual destructor of the IliRefCounted
class.
Note that since this destructor is protected, users of the IliRefCounted
object cannot explicitly delete the object.
IlInt IliRefCounted::getRefCount | ( | ) | const |
Returns the reference count of the object. Initially, this property is set to 0
.
void IliRefCounted::unLock | ( | ) | const |
Decrements the reference count of the object.
When the reference count reaches 0
, it is automatically deleted. Each call to unLock
must match a preceding call to lock
.