libcaf
0.13.2
|
An anchor points to a proxy instance without sharing ownership to it, i.e., models a weak ptr. More...
#include <actor_proxy.hpp>
Public Member Functions | |
anchor (actor_proxy *instance=nullptr) | |
bool | expired () const |
Queries whether the proxy was already deleted. | |
actor_proxy_ptr | get () |
Gets a pointer to the proxy or nullptr if the instance is expired(). More... | |
![]() | |
ref_counted (const ref_counted &) | |
ref_counted & | operator= (const ref_counted &) |
void | ref () noexcept |
Increases reference count by one. | |
void | deref () 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 |
![]() | |
virtual void | request_deletion (bool decremented_rc) noexcept |
Default implementations calls `delete this, but can be overriden in case deletion depends on some condition or the class doesn't use default new/delete. More... | |
Friends | |
class | actor_proxy |
Additional Inherited Members | |
![]() | |
std::atomic< size_t > | rc_ |
![]() | |
void | intrusive_ptr_add_ref (ref_counted *p) |
void | intrusive_ptr_release (ref_counted *p) |
An anchor points to a proxy instance without sharing ownership to it, i.e., models a weak ptr.
actor_proxy_ptr caf::actor_proxy::anchor::get | ( | ) |
Gets a pointer to the proxy or nullptr
if the instance is expired().