Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
Poco::RefCountedObject Class Reference

#include <RefCountedObject.h>

+ Inheritance diagram for Poco::RefCountedObject:
+ Collaboration diagram for Poco::RefCountedObject:

Public Member Functions

 RefCountedObject ()
 
void duplicate () const
 
void release () const noexcept
 Increments the object's reference count.
 
int referenceCount () const
 

Protected Member Functions

virtual ~RefCountedObject ()
 Returns the reference count.
 

Private Member Functions

 RefCountedObject (const RefCountedObject &)
 Destroys the RefCountedObject.
 
RefCountedObjectoperator= (const RefCountedObject &)
 

Private Attributes

AtomicCounter _counter
 

Detailed Description

A base class for objects that employ reference counting based garbage collection.

Reference-counted objects inhibit construction by copying and assignment.

Definition at line 28 of file RefCountedObject.h.

Constructor & Destructor Documentation

◆ RefCountedObject() [1/2]

Poco::RefCountedObject::RefCountedObject ( )

◆ ~RefCountedObject()

virtual Poco::RefCountedObject::~RefCountedObject ( )
protectedvirtual

Returns the reference count.

◆ RefCountedObject() [2/2]

Poco::RefCountedObject::RefCountedObject ( const RefCountedObject & )
private

Destroys the RefCountedObject.

Member Function Documentation

◆ duplicate()

void Poco::RefCountedObject::duplicate ( ) const
inline

Creates the RefCountedObject. The initial reference count is one.

Definition at line 72 of file RefCountedObject.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator=()

RefCountedObject & Poco::RefCountedObject::operator= ( const RefCountedObject & )
private

◆ referenceCount()

int Poco::RefCountedObject::referenceCount ( ) const
inline

Decrements the object's reference count and deletes the object if the count reaches zero.

Definition at line 66 of file RefCountedObject.h.

+ Here is the call graph for this function:

◆ release()

void Poco::RefCountedObject::release ( ) const
inlinenoexcept

Increments the object's reference count.

Definition at line 78 of file RefCountedObject.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ _counter

AtomicCounter Poco::RefCountedObject::_counter
mutableprivate

Definition at line 59 of file RefCountedObject.h.


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