class
RefCounted
Base class for objects managed by Ref<T>.
- Module
- Core
- Header
#include "Core/RefCounted.h"- Namespace
Mowo
Constructors
| Signature | Name | Description |
|---|---|---|
RefCounted() | RefCounted | |
virtual ~RefCounted() | ~RefCounted | |
RefCounted(const RefCounted&) = delete | RefCounted | |
RefCounted(RefCounted&&) = delete | RefCounted | Non-movable — the reference count stays with the object. |
Public functions
| Returns | Name | Description |
|---|---|---|
RefCounted& | operator= | |
RefCounted& | operator= | |
void | IncRef | |
bool | DecRef | Returns true when the caller released the last reference and must delete. |
uint32_t | GetRefCount | |
bool | TryIncRef | Promote a weak observation to a strong reference. |
FWeakRefControl* | AcquireWeakControl | Caller must hold a strong reference — the block is created on demand and the returned pointer already counts this acquisition. |
void | RetainWeakControl | |
void | ReleaseWeakControl | |
uint32_t | GetWeakRefCount |
Function details
RefCounted
C++
RefCounted()~RefCounted
C++
virtual ~RefCounted()RefCounted
C++
RefCounted(const RefCounted&) = deleteRefCounted
C++
RefCounted(RefCounted&&) = deleteNon-movable — the reference count stays with the object.
operator=
C++
RefCounted& operator=(const RefCounted&) = deleteoperator=
C++
RefCounted& operator=(RefCounted&&) = deleteIncRef
C++
void IncRef() constDecRef
C++
bool DecRef() constReturns true when the caller released the last reference and must delete. acq_rel orders every operation on the object before deletion.
GetRefCount
C++
uint32_t GetRefCount() constTryIncRef
C++
bool TryIncRef() constPromote a weak observation to a strong reference. Fails once the count has reached zero, so it never resurrects an object whose deletion is already committed. Callers must hold the control-block lock.
AcquireWeakControl
C++
FWeakRefControl* AcquireWeakControl() constCaller must hold a strong reference — the block is created on demand and the returned pointer already counts this acquisition.
RetainWeakControl
C++
static void RetainWeakControl(FWeakRefControl* control)ReleaseWeakControl
C++
static void ReleaseWeakControl(FWeakRefControl* control)GetWeakRefCount
C++
uint32_t GetWeakRefCount() constGenerated from Core/RefCounted.h via core.json · Nov 5, 2026Version 1.0.0