Public Member Functions
|Constructs a new referenceable object starting with zero references. |
|Destroys a referenceable object. |
|Makes a new reference to this object. |
|Deletes an old reference to this object. |
|Returns the current number of references that this object has. |
Static Public Member Functions
|static void||showLeaks ()|
Static Private Attributes
|static volatile int||instanceCounter = 0|
< Referenceable * >
Constructs a new referenceable object starting with zero references.
Destroys a referenceable object.
When compiling with assertions it checks that the references' counter is really zero.
Deletes an old reference to this object.
If assertions are activated this routine checks that the reference counter never get negative, because that implies an error of the programmer.
Returns the current number of references that this object has.
If it's zero you can delete the object safely.
|volatile int Referenceable::instanceCounter = 0