CYCLUS
|
IntrusiveBase provides a base class that fulfulls basic requirements for a (sub) class to be used in a boost::intrusive_ptr.
Allows subclasses to track their reference count via the onboard "counter_" member variable. To use a class as a boost::intrusive_ptr, it should inherit from IntrusiveBase with default access (NOT public). All destructors of subclasses (and subsub, etc.) should be virtual to ensure memory deallocation occurs properly for objects that have been up-casted:
Definition at line 45 of file intrusive_base.h.
#include <intrusive_base.h>
Protected Member Functions | |
IntrusiveBase () | |
IntrusiveBase (const IntrusiveBase &) | |
IntrusiveBase & | operator= (const IntrusiveBase &) |
~IntrusiveBase () | |
|
inlineprotected |
protected because we don't want direct instantiations of
Definition at line 63 of file intrusive_base.h.
|
inlineprotected |
Definition at line 65 of file intrusive_base.h.
|
inlineprotected |
the copy constructor must zero out the ref count
Definition at line 68 of file intrusive_base.h.
|
inlineprotected |
Definition at line 70 of file intrusive_base.h.