#include <GEN_Shared.h>
Inheritance diagram for GEN_Shared:
Public Methods | |
GEN_Shared () | |
Constructs a a shared object. | |
virtual int | getRef ()const |
Returns the reference count of this object. More... | |
virtual int | incRef () |
Increases the reference count of this object. More... | |
virtual int | decRef () |
Decreases the reference count of this object. More... | |
Protected Methods | |
virtual | ~GEN_Shared () |
Destructs a shared object. More... | |
Protected Attributes | |
int | m_refCount |
The reference count. |
Base class for objects with reference counting. Shared objects are created with a reference count of one. The creator of a shared object is responsible for decreasing it. If the the reference count of a shared object reaches zero, the object self-destructs. The default destructor of this object has been made protected on purpose so as not to allow shared objects to be created on the stack.
|
Destructs a shared object. The destructor is protected to force the use of incRef and decRef. |
|
Decreases the reference count of this object. If the the reference count reaches zero, the object self-destructs.
|
|
Returns the reference count of this object.
|
|
Increases the reference count of this object.
|