Core class that represents a reference with a counter.
More...
Core class that represents a reference with a counter.
◆ RefCounted()
| Nz::RefCounted::RefCounted |
( |
bool |
persistent = true | ) |
|
Constructs a RefCounted object with a persistance aspect.
- Parameters
-
| persistent | if false, object is destroyed when no more referenced |
◆ ~RefCounted()
| Nz::RefCounted::~RefCounted |
( |
| ) |
|
|
virtual |
◆ GetReferenceCount()
| unsigned int Nz::RefCounted::GetReferenceCount |
( |
| ) |
const |
Gets the number of references to the object.
- Returns
- Number of references
◆ IsPersistent()
| bool Nz::RefCounted::IsPersistent |
( |
| ) |
const |
Checks whether the object is persistent.
- Returns
- true if object is not destroyed when no more referenced
◆ RemoveReference()
| bool Nz::RefCounted::RemoveReference |
( |
| ) |
const |
Removes a reference to the object.
- Returns
- true if object is deleted because no more referenced
◆ SetPersistent()
| bool Nz::RefCounted::SetPersistent |
( |
bool |
persistent = true, |
|
|
bool |
checkReferenceCount = false |
|
) |
| |
Sets the persistence of the object.
- Returns
- true if object is deleted because no more referenced
- Parameters
-
| persistent | Sets the persistence of the object |
| checkReferenceCount | Checks if the object should be destroyed if true |
The documentation for this class was generated from the following files: