- Timestamp:
- Jun 7, 2015, 12:12:20 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/module/StaticInitializationManager.cc
r10532 r10536 51 51 void StaticInitializationManager::loadModule(ModuleInstance* module) 52 52 { 53 // attention: loading a module may add new handlers to the list 53 54 for (std::list<StaticInitializationHandler*>::iterator it = this->handlers_.begin(); it != this->handlers_.end(); ++it) 54 55 (*it)->loadModule(module); … … 57 58 void StaticInitializationManager::unloadModule(ModuleInstance* module) 58 59 { 59 for (std::list<StaticInitializationHandler*>::iterator it = this->handlers_.begin(); it != this->handlers_.end(); ++it) 60 (*it)->unloadModule(module); 60 // unload in reversed order 61 // attention: unloading a module may remove handlers from the list 62 for (std::list<StaticInitializationHandler*>::reverse_iterator it = this->handlers_.rbegin(); it != this->handlers_.rend(); ) 63 (*(it++))->unloadModule(module); 61 64 } 62 65 }
Note: See TracChangeset
for help on using the changeset viewer.