FastUIDraw
|
Reference counter that is thread safe by having increment and decrement operations by atomic operations, this is usually faster (and much faster) than reference_count_mutex. More...
#include <reference_count_atomic.hpp>
Public Member Functions | |
reference_count_atomic (void) | |
void | add_reference (void) |
bool | remove_reference (void) |
Reference counter that is thread safe by having increment and decrement operations by atomic operations, this is usually faster (and much faster) than reference_count_mutex.
Definition at line 38 of file reference_count_atomic.hpp.
fastuidraw::reference_count_atomic::reference_count_atomic | ( | void | ) |
Initializes the counter as zero.
void fastuidraw::reference_count_atomic::add_reference | ( | void | ) |
Increment reference counter by 1.
bool fastuidraw::reference_count_atomic::remove_reference | ( | void | ) |
Decrements the counter by 1 and returns status of if the counter is 0 after the decrement operation.