Intrusive refcounting base class.
More...
#include <asyncpp/ref.h>
|
size_t | use_count () const noexcept |
| Get the current use_count of this object.
|
|
void | add_ref () const noexcept |
| Increment the reference count.
|
|
void | remove_ref () const noexcept |
| Decrement the reference count and delete the object if the last reference is removed.
|
|
template<typename T, RefCount TCounter>
class asyncpp::intrusive_refcount< T, TCounter >
Intrusive refcounting base class.
- Template Parameters
-
◆ remove_ref()
template<typename T , RefCount TCounter>
Decrement the reference count and delete the object if the last reference is removed.
- Note
- This might invoke the equivalent of
delete (T*)this
. Make sure you do not access any member data after calling unless you hold an extra reference to it.
◆ use_count()
template<typename T , RefCount TCounter>
Get the current use_count of this object.
- Returns
- size_t The reference count
The documentation for this class was generated from the following file: