Blender
V3.3
|
#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 |
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 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 25 of file MEM_RefCounted.h.
|
inline |
Constructs a shared object.
Definition at line 30 of file MEM_RefCounted.h.
|
inlineprotectedvirtual |
Destructs a shared object. The destructor is protected to force the use of incRef and decRef.
Definition at line 58 of file MEM_RefCounted.h.
|
inlinevirtual |
Decreases the reference count of this object. If the reference count reaches zero, the object self-destructs.
Definition at line 77 of file MEM_RefCounted.h.
References m_refCount.
|
inlinevirtual |
Returns the reference count of this object.
Definition at line 67 of file MEM_RefCounted.h.
References m_refCount.
|
inlinevirtual |
Increases the reference count of this object.
Definition at line 72 of file MEM_RefCounted.h.
References m_refCount.
|
protected |
The reference count.
Definition at line 64 of file MEM_RefCounted.h.