Qore Programming Language
0.8.11.1
|
provides atomic reference counting to Qore objects More...
#include <QoreReferenceCounter.h>
Public Member Functions | |
DLLEXPORT | QoreReferenceCounter () |
creates the reference counter object | |
DLLEXPORT | ~QoreReferenceCounter () |
destroys the reference counter object | |
DLLLOCAL bool | is_unique () const |
returns true if the reference count is 1 More... | |
DLLLOCAL int | reference_count () const |
gets the reference count More... | |
DLLEXPORT bool | ROdereference () const |
atomically decrements the reference count More... | |
DLLEXPORT void | ROreference () const |
atomically increments the reference count | |
Protected Attributes | |
QoreThreadLock | mRO |
pthread lock to ensure atomicity of updates for architectures where we don't have an atomic increment and decrement implementation | |
provides atomic reference counting to Qore objects
|
inline |
returns true if the reference count is 1
Referenced by QoreListNodeEvalOptionalRefHolder::edit().
|
inline |
gets the reference count
DLLEXPORT bool QoreReferenceCounter::ROdereference | ( | ) | const |
atomically decrements the reference count
returns true if the reference count is now zero
Referenced by AbstractPrivateData::deref().