![]() |
XII Release 0.1.0
|
Copyright (c) Theophilus Eriata. All Rights Reserved. More...
#include <RefCounted.h>
Public Member Functions | |
| xiiRefCountingImpl ()=default | |
| Constructor. | |
| xiiRefCountingImpl (const xiiRefCountingImpl &rhs) | |
| void | operator= (const xiiRefCountingImpl &rhs) |
| xiiUInt32 | AddRef () const |
| Increments the reference counter. Returns the new reference count. | |
| bool | TryAddRef () const |
| xiiUInt32 | ReleaseRef () const |
| Decrements the reference counter. Returns the new reference count.ywat. | |
| bool | IsReferenced () const |
| Returns true if the reference count is greater than 0, false otherwise. | |
| xiiUInt32 | GetRefCount () const |
| Returns the current reference count. | |
Copyright (c) Theophilus Eriata. All Rights Reserved.
|
inline |
Adds a reference only while the count is nonzero. Never resurrects an object whose last reference was released.
The caller must separately ensure the object's memory remains accessible (for example, with a cache lock also taken by its destructor); this is not a weak pointer by itself.