Qore Programming Language 1.14.2
|
provides atomic reference counting to Qore objects More...
#include <QoreReferenceCounter.h>
Public Member Methods | |
DLLEXPORT | QoreReferenceCounter () |
creates the reference counter object | |
DLLEXPORT | QoreReferenceCounter (const QoreReferenceCounter &old) |
creates a new object with a reference count of 1 More... | |
DLLEXPORT | ~QoreReferenceCounter () |
destroys the reference counter object | |
DLLEXPORT bool | is_unique () const |
returns true if the reference count is 1 More... | |
DLLEXPORT 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 | |
provides atomic reference counting to Qore objects
DLLEXPORT QoreReferenceCounter::QoreReferenceCounter | ( | const QoreReferenceCounter & | old | ) |
creates a new object with a reference count of 1
DLLEXPORT bool QoreReferenceCounter::is_unique | ( | ) | const |
returns true if the reference count is 1
Referenced by QoreListNodeEvalOptionalRefHolder::canEdit().
DLLEXPORT int QoreReferenceCounter::reference_count | ( | ) | const |
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 DataLineIterator::deref(), FileLineIterator::deref(), InputStreamLineIterator::deref(), and AbstractPrivateData::deref().