2 #ifndef _REFCOUNTER_CPP_
3 #define _REFCOUNTER_CPP_
129 if (ptr_->refcount_ <= 0)
This template class provides transparent reference counting of its template parameter T.
T * get(void)
get the underlying pointer
T & operator*(void)
dereference operator
T * get_ptr(void)
get the underlying pointer
void decrement(void)
implementation of the decrement operation
void operator=(T *ptr)
assignment operator for times when you don't want the reference increased for incoming ptr
void increment(void)
implementation of the increment operation
Shim * ptr_
Pointer to the Shim.
T * operator->(void)
mimic pointer dereferencing
Refcounter(void)
default Ctor
A shim class that keeps track of the reference count and a pointer to the type T that's reference cou...