libcppa
Version 0.1
|
#include <ref_counted.hpp>
Public Member Functions | |
void | ref () |
bool | deref () |
bool | unique () |
A (thread safe) base class for reference counted objects with an atomic reference count.
Serves the requirements of intrusive_ptr.
bool cppa::ref_counted::deref | ( | ) |
Decreases reference cound by one.
true
if there are still references to this object (reference count > 0); otherwise false
. void cppa::ref_counted::ref | ( | ) |
Increases reference count by one.
bool cppa::ref_counted::unique | ( | ) |
Queries if there is exactly one reference.
true
if reference count is one; otherwise false
.