EvEmu
0.8.4
11 September 2021
|
A reference-counted object. More...
#include "RefPtr.h"
Public Member Functions | |
RefObject (size_t initRefCount) | |
Initializes reference count. More... | |
virtual | ~RefObject () |
Destructor; must be virtual. More... | |
size_t | GetCount () |
Protected Member Functions | |
void | IncRef () const |
Increments reference count of object by one. More... | |
void | DecRef () const |
Decrements reference count of object by one. More... | |
Protected Attributes | |
size_t | mRefCount |
Reference count of instance. More... | |
bool | mDeleted |
Friends | |
template<typename X > | |
class | RefPtr |
A reference-counted object.
This class has all stuff needed to cooperate with RefPtr. If you want your class to be reference-counted, derive them from this class.
NOTE: this class does NOT increment count on creation (whereas RefPtr does)
|
inline |
|
inlinevirtual |
|
inlineprotected |
|
inlineprotected |
Increments reference count of object by one.
Definition at line 84 of file RefPtr.h.
References _log, mDeleted, mRefCount, and EvE::traceStack().
|
mutableprotected |
Definition at line 120 of file RefPtr.h.
Referenced by DecRef(), IncRef(), RefObject(), and ~RefObject().
|
mutableprotected |
Reference count of instance.
Definition at line 119 of file RefPtr.h.
Referenced by DecRef(), GetCount(), and IncRef().