Blender V2.61 - r43446
|
#include <MEM_RefCounted.h>
Public Member Functions | |
MEM_RefCounted () | |
virtual int | getRef () const |
virtual int | incRef () |
virtual int | decRef () |
Protected Member Functions | |
virtual | ~MEM_RefCounted () |
Protected Attributes | |
int | m_refCount |
The reference count. |
An object with reference counting. Base class for objects with reference counting. When a shared object is ceated, it has reference count == 1. 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. This disables the creation of shared objects on the stack.
Definition at line 52 of file MEM_RefCounted.h.
MEM_RefCounted::MEM_RefCounted | ( | ) | [inline] |
Constructs a a shared object.
Definition at line 57 of file MEM_RefCounted.h.
virtual MEM_RefCounted::~MEM_RefCounted | ( | ) | [inline, protected, virtual] |
Destructs a shared object. The destructor is protected to force the use of incRef and decRef.
Definition at line 85 of file MEM_RefCounted.h.
int MEM_RefCounted::decRef | ( | ) | [inline, virtual] |
Decreases the reference count of this object. If the the reference count reaches zero, the object self-destructs.
Definition at line 105 of file MEM_RefCounted.h.
References m_refCount.
int MEM_RefCounted::getRef | ( | ) | const [inline, virtual] |
Returns the reference count of this object.
Definition at line 95 of file MEM_RefCounted.h.
References m_refCount.
int MEM_RefCounted::incRef | ( | ) | [inline, virtual] |
Increases the reference count of this object.
Definition at line 100 of file MEM_RefCounted.h.
References m_refCount.
int MEM_RefCounted::m_refCount [protected] |
The reference count.
Definition at line 91 of file MEM_RefCounted.h.