1 #ifndef _theplu_yat_utility_smart_ptr_
2 #define _theplu_yat_utility_smart_ptr_
26 #include "yat_assert.h"
75 ref_count_ =
new unsigned int(1);
84 : pointee_(other.pointee_), ref_count_(other.ref_count_)
107 if (pointee_!=rhs.pointee_){
109 pointee_ = rhs.pointee_;
110 ref_count_= rhs.ref_count_;
135 unsigned int* ref_count_;
140 if (!--(*ref_count_))
virtual ~SmartPtr()
Destructor.
Definition: SmartPtr.h:95
SmartPtr(T *p=NULL, bool owner=true)
Constructor.
Definition: SmartPtr.h:71
T * operator->(void) const
Definition: SmartPtr.h:120
SmartPtr(const SmartPtr &other)
Copy constructor.
Definition: SmartPtr.h:83
T & operator*(void) const
Definition: SmartPtr.h:128
Definition: SmartPtr.h:46
SmartPtr & operator=(const SmartPtr &rhs)
Definition: SmartPtr.h:105