|
CeresEngine 0.2.0
A game development framework
|
A class that implements a simple interface for reference counting. More...
#include <CeresEngine/Foundation/SmartPtr.hpp>
Public Member Functions | |
| RefCounter ()=default | |
| RefCounter (const UInt64 initialCount) | |
| void | increment () noexcept |
| Increments the reference counter by one. | |
| bool | decrement () noexcept |
| Decrements the reference counter by one. | |
Private Attributes | |
| Atomic< UInt64 > | mCounter = 0 |
| The object's reference counter. | |
A class that implements a simple interface for reference counting.
This implementation uses an atomic counter and is thread-safe.
|
default |
|
inlineexplicit |
|
noexcept |
Decrements the reference counter by one.
true if the counter is now 0.
|
noexcept |
Increments the reference counter by one.
|
private |
The object's reference counter.