Qore Programming Language 0.8.8

- Main Page
- Related Pages
- Modules
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
QoreReferenceCounter Class Reference

provides atomic reference counting to Qore objects More...

`#include <QoreReferenceCounter.h>`

Inheritance diagram for QoreReferenceCounter:
[legend]
Collaboration diagram for QoreReferenceCounter:
[legend]

## 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

## Detailed Description

provides atomic reference counting to Qore objects

## Member Function Documentation

DLLLOCAL bool QoreReferenceCounter::is_unique | ( |  | ) | const
| inline

returns true if the reference count is 1

Returns
  returns true if the reference count is 1

Referenced by QoreListNodeEvalOptionalRefHolder::edit().

DLLLOCAL int QoreReferenceCounter::reference_count | ( |  | ) | const
| inline

gets the reference count

Returns
  returns the current reference count

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

Referenced by AbstractPrivateData::deref().

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

- include/qore/QoreReferenceCounter.h (6086)