![]() |
ezEngine Release 26.3
|
Thread-safe reference counting implementation using atomic operations. More...
#include <RefCounted.h>

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