Changeset 5825
- Timestamp:
- Sep 28, 2009, 8:59:34 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/libraries/core/WeakPtr.h
r5824 r5825 141 141 inline void swap(WeakPtr& other) 142 142 { 143 if (this->base_) 144 this->base_->unregisterWeakPtr(this); 145 if (other.base_) 146 other.base_->unregisterWeakPtr(&other); 147 143 148 { 144 149 T* temp = this->pointer_; … … 151 156 other.base_ = temp; 152 157 } 158 159 if (this->base_) 160 this->base_->registerWeakPtr(this); 161 if (other.base_) 162 other.base_->registerWeakPtr(&other); 153 163 } 154 164 … … 171 181 inline void objectDeleted() 172 182 { 173 this->reset(); 183 this->base_ = 0; 184 this->pointer_ = 0; 174 185 if (this->callback_) 175 186 (*this->callback_)();
Note: See TracChangeset
for help on using the changeset viewer.