1 #ifndef _theplu_yat_utility_smart_ptr_
2 #define _theplu_yat_utility_smart_ptr_
26 #include "yat_assert.h"
77 ref_count_ =
new unsigned int(1);
86 : pointee_(other.pointee_), ref_count_(other.ref_count_)
109 if (pointee_!=rhs.pointee_){
111 pointee_ = rhs.pointee_;
112 ref_count_= rhs.ref_count_;
137 unsigned int* ref_count_;
142 if (!--(*ref_count_))
virtual ~SmartPtr()
Destructor.
Definition: SmartPtr.h:97
SmartPtr(T *p=NULL, bool owner=true)
Constructor.
Definition: SmartPtr.h:73
T * operator->(void) const
Definition: SmartPtr.h:122
SmartPtr(const SmartPtr &other)
Copy constructor.
Definition: SmartPtr.h:85
T & operator*(void) const
Definition: SmartPtr.h:130
Definition: SmartPtr.h:48
SmartPtr & operator=(const SmartPtr &rhs)
Definition: SmartPtr.h:107