PIPS-NLP
|
#include <IotrRefCount.h>
Public Member Functions | |
int | refs () |
IotrRefCount () | |
Static Public Member Functions | |
static void | release (IotrRefCount **obj) |
static void | addRef (IotrRefCount *const *obj) |
Static Public Attributes | |
static int | instances = 0 |
Protected Member Functions | |
virtual | ~IotrRefCount () |
Private Member Functions | |
IotrRefCount & | operator= (const IotrRefCount &) |
IotrRefCount (const IotrRefCount &) | |
Private Attributes | |
int | mRefs |
A base class for classes that support reference-count garbage collection.
|
inline |
Default constructor. Creates an instance with one reference
|
inlineprotectedvirtual |
Protected virtual destructor. One should not call delete on reference-counted objects.
|
inlineprivate |
Copy constructor. Make sure the reference count for the new object equals one. In general, IotrRefCount objects should not be copied this way, which is why this constructor is private.
|
inlineprivate |
Operator =. Makes sure that even though all other variables are copied, the reference count is not! In general, IotrRefCount objects should not be copied this way, which is why this operator is private.
|
inline |
The number of references to this object.
|
static |
The number of instances of IotrRefCount. This is useful for debugging purposes. If not zero when the program exits, you have a memory leak.
|
private |
The number of (hard) references to this object