Reference count structure.
More...
#include <Urho3D/Container/RefCounted.h>
|
|
using | Allocator = EASTLAllocatorType |
| |
|
|
| RefCount ()=default |
| | Construct.
|
| |
|
|
std::atomic_int32_t | refs_ {0} |
| | Reference count. If below zero, the object has been destroyed.
|
| |
|
std::atomic_int32_t | weakRefs_ {0} |
| | Weak reference count.
|
| |
Reference count structure.
◆ AddRefStrong()
| int Urho3D::RefCount::AddRefStrong |
( |
| ) |
|
|
inline |
Add strong reference. Returns new reference count. If the object has been destroyed, behavior is undefined.
◆ AddRefWeak()
| int Urho3D::RefCount::AddRefWeak |
( |
| ) |
|
|
inline |
Add weak reference. Returns new reference count. If the control block has been destroyed, behavior is undefined.
◆ ReleaseRefStrong()
| int Urho3D::RefCount::ReleaseRefStrong |
( |
| ) |
|
|
inline |
Release strong reference. Returns new reference count. If 0 is returned, the object must be destroyed immediately. If the object has been destroyed, behavior is undefined.
◆ ReleaseRefWeak()
| int Urho3D::RefCount::ReleaseRefWeak |
( |
| ) |
|
|
inline |
Release weak reference. Returns new reference count. If 0 is returned, the control block must be destroyed immediately.
◆ TryAddRefStrong()
| bool Urho3D::RefCount::TryAddRefStrong |
( |
| ) |
|
|
inline |
Try add strong reference. The object may be destroyed. Returns true if strong reference was added.
The documentation for this struct was generated from the following files:
- Urho3D/Container/RefCounted.h
- Urho3D/Container/RefCounted.cpp