#include <Referenceable.h>

Public Member Functions | |
| Referenceable () | |
| Constructs a new referenceable object starting with zero references. | |
| virtual | ~Referenceable () |
| Destroys a referenceable object. | |
| void | ref () |
| Makes a new reference to this object. | |
| unsigned | unref () |
| Deletes an old reference to this object. | |
| unsigned | getRefCount () |
| Returns the current number of references that this object has. | |
Static Public Member Functions | |
| static void | showLeaks () |
Private Attributes | |
| unsigned | m_refCount |
Static Private Attributes | |
| static Mutex | mutex |
| static volatile int | instanceCounter = 0 |
| static std::vector < Referenceable * > | list |
| Referenceable::Referenceable | ( | ) |
Constructs a new referenceable object starting with zero references.
| Referenceable::~Referenceable | ( | ) | [virtual] |
Destroys a referenceable object.
When compiling with assertions it checks that the references' counter is really zero.
| void Referenceable::ref | ( | ) |
| unsigned Referenceable::unref | ( | ) |
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.
| unsigned Referenceable::getRefCount | ( | ) |
Returns the current number of references that this object has.
If it's zero you can delete the object safely.
| void Referenceable::showLeaks | ( | ) | [static] |
unsigned Vaca::Referenceable::m_refCount [private] |
Mutex Referenceable::mutex [static, private] |
volatile int Referenceable::instanceCounter = 0 [static, private] |
std::vector< Referenceable * > Referenceable::list [static, private] |