![]() |
BoB robotics
The Brains on Board robotics library
|
Reference counted object base class. More...
#include <object.h>
Public Member Functions | |
Object () | |
Default constructor. | |
Object (const Object &) | |
Copy constructor. | |
int | getRefCount () const |
Return the current reference count. | |
void | incRef () const |
Increase the object's reference count by one. | |
void | decRef (bool dealloc=true) const |
Decrease the reference count of the object and possibly deallocate it. More... | |
virtual std::string | toString () const =0 |
Protected Member Functions | |
virtual | ~Object () |
Virtual protected deconstructor. (Will only be called by ref) | |
Reference counted object base class.
|
inline |
Decrease the reference count of the object and possibly deallocate it.
The object will automatically be deallocated once the reference count reaches zero.