![]() |
Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
|
Base class for object with usage counter. More...
#include <usage_counter.h>
Public Member Functions | |
bool | is_used () const |
Check whether usage counter is non-zero. | |
void | acquire_usage () const |
Increment usage counter. | |
void | release_usage () const |
Decrement usage counter. | |
Base class for object with usage counter.
Allows to increment and descrement usage counter of the object. Checks the counter in destructor and panics if it's non-zero.
Thread-safe.
Definition at line 28 of file usage_counter.h.
|
inline |
Definition at line 30 of file usage_counter.h.
|
inline |
Definition at line 34 of file usage_counter.h.
|
inline |
Increment usage counter.
Definition at line 54 of file usage_counter.h.
|
inline |
Check whether usage counter is non-zero.
Definition at line 43 of file usage_counter.h.
|
inline |
Decrement usage counter.
Definition at line 63 of file usage_counter.h.