Qore Programming Language  0.9.3.1
QoreReferenceCounter Class Reference

provides atomic reference counting to Qore objects More...

#include <QoreReferenceCounter.h>

Inheritance diagram for QoreReferenceCounter:

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
 

Detailed Description

provides atomic reference counting to Qore objects

Constructor & Destructor Documentation

◆ QoreReferenceCounter()

DLLEXPORT QoreReferenceCounter::QoreReferenceCounter ( const QoreReferenceCounter old)

creates a new object with a reference count of 1

Since
Qore 0.8.12.9

Member Function Documentation

◆ is_unique()

DLLEXPORT bool QoreReferenceCounter::is_unique ( ) const

returns true if the reference count is 1

Returns
returns true if the reference count is 1

◆ reference_count()

DLLEXPORT int QoreReferenceCounter::reference_count ( ) const

gets the reference count

Returns
returns the current reference count

◆ ROdereference()

DLLEXPORT bool QoreReferenceCounter::ROdereference ( ) const

atomically decrements the reference count

returns true if the reference count is now zero

Returns
true if the reference count is now zero

The documentation for this class was generated from the following file: