Changeset 5791 for code/branches/core5/src/libraries/core/OrxonoxClass.cc
- Timestamp:
- Sep 26, 2009, 2:05:30 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/libraries/core/OrxonoxClass.cc
r5772 r5791 45 45 this->parents_ = 0; 46 46 this->metaList_ = new MetaObjectList(); 47 this->referenceCount_ = 0; 48 this->requestedDestruction_ = false; 47 49 } 48 50 … … 55 57 if (this->parents_) 56 58 delete this->parents_; 59 } 60 61 /** @brief Deletes the object if no smart pointers point to this object. Otherwise schedules the object to be deleted as soon as possible. */ 62 void OrxonoxClass::destroy() 63 { 64 if (this->referenceCount_ > 0) 65 this->requestedDestruction_ = true; 66 else 67 delete this; 57 68 } 58 69
Note: See TracChangeset
for help on using the changeset viewer.