#include <refcnt.h>
Public Member Functions | |
RefCnt (RefCnt &r) | |
void | _incref () const |
bool | _decref () const |
const RefCnt & | operator= (const RefCnt &r) const |
Mix-in class that adds a reference count, implemented as an atomic counter.
RefCnt::RefCnt | ( | RefCnt & | r | ) | [inline] |
Define copy constructor to NOT COPY reference counts! Copying a struct doesn't change how many other things point to it.
bool RefCnt::_decref | ( | ) | const [inline] |
Delete a reference, return true if that was the last reference.
void RefCnt::_incref | ( | ) | const [inline] |
Add a reference
Define operator= to NOT COPY reference counts! Assigning a struct doesn't change how many other things point to it.