ezEngine Release 26.3
Loading...
Searching...
No Matches
ezRefCountingImpl Class Reference

Thread-safe reference counting implementation using atomic operations. More...

#include <RefCounted.h>

Inheritance diagram for ezRefCountingImpl:

Public Member Functions

 ezRefCountingImpl ()=default
 Constructor.
 
 ezRefCountingImpl (const ezRefCountingImpl &rhs)
 
void operator= (const ezRefCountingImpl &rhs)
 
ezInt32 AddRef () const
 Increments the reference counter. Returns the new reference count.
 
ezInt32 ReleaseRef () const
 Decrements the reference counter. Returns the new reference count.
 
bool IsReferenced () const
 Returns true if the reference count is greater than 0, false otherwise.
 
ezInt32 GetRefCount () const
 Returns the current reference count.
 

Detailed Description

Thread-safe reference counting implementation using atomic operations.

Provides the core reference counting functionality that can be used as a base class or component in objects that need reference counting. Uses atomic operations for thread-safe increment/decrement operations. Does not provide automatic deletion - derived classes or users must implement the deletion logic when reference count reaches zero.


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