32#ifndef _QORE_QOREREFERENCECOUNTER_H
34#define _QORE_QOREREFERENCECOUNTER_H
37#include <qore/macros.h>
90 mutable std::atomic_int references;
Provides atomic reference counting to Qore objects.
Definition QoreReferenceCounter.h:44
DLLEXPORT void ROreference() const
Atomically increments the reference count.
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 bool is_unique() const
Returns true if the reference count is 1.
DLLEXPORT QoreReferenceCounter(const QoreReferenceCounter &old)
Creates a new object with a reference count of 1.
DLLEXPORT ~QoreReferenceCounter()
destroys the reference counter object
DLLEXPORT QoreReferenceCounter()
Creates the reference counter object.
provides a mutually-exclusive thread lock
Definition QoreThreadLock.h:49