|
SleakEngine 1.0.0
C++23 multi-backend game engine
|
#include <RefPtr.hpp>
Public Member Functions | |
| SharedControlBlock () | |
Public Attributes | |
| std::atomic< size_t > | refCount |
| Number of RefPtr instances currently owning the object. | |
Reference count shared by every RefPtr aimed at one object.
Allocated separately from the object, and non-templated so that a RefPtr<Base> converted from a RefPtr<Derived> shares the same count. The counter is atomic, so copying and destroying RefPtrs across threads is safe; the pointed-to object still needs its own synchronization.
Definition at line 18 of file RefPtr.hpp.
|
inline |
Definition at line 21 of file RefPtr.hpp.
| std::atomic<size_t> Sleak::SharedControlBlock::refCount |
Number of RefPtr instances currently owning the object.
Definition at line 20 of file RefPtr.hpp.