Class for implementing reference counting garbage collection.
More...
#include <utility.hpp>
Class for implementing reference counting garbage collection.
Commonly used in ELDEN RING's codebase.
- Note
- Instances of DLReferenceCountObject can only be constructed on the heap, using with from::make_refcounted.
-
Derived classes may override the deleter method.
◆ DLReferenceCountObject()
from::DLUT::DLReferenceCountObject::DLReferenceCountObject |
( |
| ) |
|
|
protecteddefaultnoexcept |
◆ count()
int from::DLUT::DLReferenceCountObject::count |
( |
| ) |
const |
|
inlinenoexcept |
Get number of references to object.
- Returns
- int reference count
◆ unref()
void from::DLUT::DLReferenceCountObject::unref |
( |
| ) |
|
|
inline |
Unreference object; there cannot be more ref() calls than unref() calls.
- Exceptions
-
The documentation for this class was generated from the following file: