|
Nugget
|
#include <safe_ptr.h>

Public Member Functions | |
| bool | is_unreferenced () const |
| bool | has_unique_reference () const |
| Returns true if there are zero references (by a smart_ptr) to this object (mpSafePtrList is NULL). | |
| bool | has_references () const |
Protected Member Functions | |
| safe_object () | |
| Returns true if there is at most one reference (by a smart_ptr) to us. | |
| void | clear_references () |
Friends | |
| class | safe_ptr_base |
| Forcibly removes any references (by smart_ptrs) to this object. All safe_ptr mpObject values are set to NULL. | |
In order for a class to be the template argument for safe_ptr, it must derive from safe_object.
Example usage: class RandomLifetimeObject : public safe_object { public: RandomLifetimeObject(); Method(); ... };