FastUIDraw
Public Member Functions | List of all members
fastuidraw::reference_count_atomic Class Reference

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>

Inheritance diagram for fastuidraw::reference_count_atomic:
Inheritance graph
[legend]

Public Member Functions

 reference_count_atomic (void)
 
void add_reference (void)
 
bool remove_reference (void)
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ reference_count_atomic()

fastuidraw::reference_count_atomic::reference_count_atomic ( void  )

Initializes the counter as zero.

Member Function Documentation

◆ add_reference()

void fastuidraw::reference_count_atomic::add_reference ( void  )

Increment reference counter by 1.

◆ remove_reference()

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.


The documentation for this class was generated from the following file: