RefCounter¶
class RefCounter
Holds the number of references to an object.
Functions¶
Name | Description |
---|---|
RefCounter | Constructs a new RefCounter . |
Increment | Updates the counter by adding one reference. |
Decrement | Updates the counter by removing one reference. |
GetCount | Gets the current number of references. |
Function Details¶
Decrement¶
AmInt32 Decrement()
Updates the counter by removing one reference.
- Return
- The number of references.
GetCount¶
[[nodiscard]] inline AmInt32 GetCount() const
Gets the current number of references.
- Return
- The current number of references.
Increment¶
AmInt32 Increment()
Updates the counter by adding one reference.
- Return
- The number of references.
RefCounter¶
RefCounter()
Constructs a new RefCounter
.
This initializes the internal counter to 0.