![]() |
Qore Programming Language - C/C++ Library 2.1.1
|
Provides atomic reference counting to Qore objects. More...
#include <QoreReferenceCounter.h>
Public Member Functions | |
| DLLEXPORT | QoreReferenceCounter () |
| Creates the reference counter object. | |
| DLLEXPORT | QoreReferenceCounter (const QoreReferenceCounter &old) |
| Creates a new object with a reference count of 1. | |
| DLLEXPORT | ~QoreReferenceCounter () |
| destroys the reference counter object | |
| DLLEXPORT bool | is_unique () const |
| Returns true if the reference count is 1. | |
| DLLEXPORT bool | optRef () |
| Make a strong reference only if the object is valid. | |
| DLLEXPORT int | reference_count () const |
| Gets the reference count. | |
| DLLEXPORT bool | ROdereference () const |
| Atomically decrements the reference count. | |
| 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.
| DLLEXPORT bool QoreReferenceCounter::optRef | ( | ) |
Make a strong reference only if the object is valid.
| 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 AbstractPrivateData::deref(), AbstractPrivateData::deref(), and ResolvedCallReferenceNode::weakDeref().