75 _copy(ptr.
get(), ptr.refCountPtr(), ptr.explicitDelete());
79 template <
typename T2>
83 _copy(ptr.
get(), ptr.refCountPtr(), ptr.explicitDelete());
87 template <
typename T2>
95 template <
typename T2>
98 _copy(
dynamic_cast<T*
>(ptr.
get()), ptr.refCountPtr(), ptr.explicitDelete());
104 _copy(ptr.
get(), ptr.refCountPtr(), ptr.explicitDelete());
109 template <
typename T2>
113 _copy(ptr.
get(), ptr.refCountPtr(), ptr.explicitDelete());
117 bool isUnique()
const {
return (m_counter->refCount() == 1); }
118 Int32 refCount()
const {
return (m_counter) ? m_counter->refCount() : 0; }
119 bool isUsed()
const {
return (m_counter != NULL); }
124 m_counter->removeRef();
125 if (m_counter->refCount() == 0) {
127 delete BaseClass::m_value;
131 BaseClass::m_value = 0;
134 RefCounter* refCountPtr()
const {
return m_counter; }
135 bool explicitDelete()
const {
return m_free; }
139 void _copy(T* ptr,
RefCounter* ref,
bool free)
141 BaseClass::operator=(ptr);