- Timestamp:
- May 3, 2015, 2:39:30 PM (10 years ago)
- Location:
- code/branches/core7/src/libraries/core
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/CorePrereqs.h
r10413 r10419 157 157 class Core; 158 158 class Destroyable; 159 class DestroyLaterManager; 159 160 class DestructionListener; 160 161 class DynLib; -
code/branches/core7/src/libraries/core/object/CMakeLists.txt
r9667 r10419 2 2 Context.cc 3 3 Destroyable.cc 4 DestroyLaterManager.cc 4 5 Listable.cc 5 6 ObjectListBase.cc -
code/branches/core7/src/libraries/core/object/Destroyable.cc
r9944 r10419 33 33 34 34 #include "Destroyable.h" 35 #include "DestroyLaterManager.h" 35 36 36 37 #include <cassert> … … 74 75 } 75 76 } 77 78 /** 79 * Works like @ref destroy() but doesn't destroy the object until the current tick has ended. 80 */ 81 void Destroyable::destroyLater() 82 { 83 // register in DestroyLaterManager - this ensures that a smartPtr points to this object and keeps it alive for a while 84 DestroyLaterManager::getInstance().retain(this); 85 86 // request destruction -> object will be deleted after all smartPtrs (including the one in DestroyLaterManager) were destroyed. 87 this->destroy(); 88 } 76 89 } -
code/branches/core7/src/libraries/core/object/Destroyable.h
r9944 r10419 57 57 58 58 void destroy(); 59 void destroyLater(); 59 60 60 61 /// Returns the number of @ref orxonox::SmartPtr "smart pointers" that point to this object.
Note: See TracChangeset
for help on using the changeset viewer.