Base class for reference counted objects with an atomic reference count.
More...
#include <ref_counted.hpp>
|
| ref_counted (const ref_counted &) |
|
ref_counted & | operator= (const ref_counted &) |
|
void | ref () const noexcept |
| Increases reference count by one.
|
|
void | deref () const noexcept |
| Decreases reference count by one and calls request_deletion when it drops to zero. More...
|
|
bool | unique () const noexcept |
| Queries whether there is exactly one reference.
|
|
size_t | get_reference_count () const noexcept |
|
|
std::atomic< size_t > | rc_ |
|
Base class for reference counted objects with an atomic reference count.
Serves the requirements of intrusive_ptr.
- Note
- All instances of
ref_counted
start with a reference count of 1.
◆ deref()
void caf::ref_counted::deref |
( |
| ) |
const |
|
noexcept |
Decreases reference count by one and calls request_deletion
when it drops to zero.
◆ intrusive_ptr_add_ref()
◆ intrusive_ptr_release()
◆ make_copy_on_write()
template<class T , class... Ts>
The documentation for this class was generated from the following files:
- libcaf_core/caf/ref_counted.hpp
- libcaf_core/caf/make_copy_on_write.hpp
- libcaf_core/caf/make_counted.hpp