9 #ifndef BOOSTER_REFCOUNTED_H
10 #define BOOSTER_REFCOUNTED_H
12 #include <booster/atomic_counter.h>
17 void intrusive_ptr_add_ref(refcounted *ptr);
18 void intrusive_ptr_release(refcounted *ptr);
57 if(p && --p->refs_ == 0)
This class is used as base class for reference counted objects that use intrusive_ptr. Deriving from this class allows simple way to manage reference counting for single object.
Definition: refcounted.h:25
friend void intrusive_ptr_release(refcounted *)
Definition: refcounted.h:55
friend void intrusive_ptr_add_ref(refcounted *)
Definition: refcounted.h:48
Atomic counter is a class that allows perform counting in thread safe way.
Definition: atomic_counter.h:33