Changeset 10527
- Timestamp:
- Jun 6, 2015, 10:43:12 AM (10 years ago)
- Location:
- code/branches/core7/src/libraries/core
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/Core.cc
r10525 r10527 128 128 // TODO: initialize CommandLineParser here 129 129 // TODO: initialize ConsoleCommandManager here 130 // TODO: initialize NetworkFunctionManager here 130 131 this->rootModule_ = ModuleInstance::getCurrentModuleInstance(); 131 132 this->rootModule_->loadAllStaticallyInitializedInstances(); … … 241 242 safeObjectDelete(&languageInstance_); 242 243 safeObjectDelete(&configFileManager_); 244 safeObjectDelete(&signalHandler_); 245 Context::getRootContext()->unregisterObject(); // unregister context from object lists - otherwise the root context would be destroyed while unloading the root module 246 if (this->rootModule_) 247 { 248 this->rootModule_->unloadAllStaticallyInitializedInstances(); 249 this->rootModule_->deleteAllStaticallyInitializedInstances(); 250 } 243 251 Context::setRootContext(NULL); 244 safeObjectDelete(&signalHandler_); 245 // if (this->rootModule_) 246 // this->rootModule_->unloadAllStaticallyInitializedInstances(); 247 // safeObjectDelete(&rootModule_); 252 safeObjectDelete(&rootModule_); 248 253 safeObjectDelete(&dynLibManager_); 249 254 safeObjectDelete(&configurablePaths_); … … 277 282 void Core::loadModule(ModuleInstance* module) 278 283 { 284 orxout(internal_info) << "Loading module " << module->getName() << "..." << endl; 285 279 286 ModuleInstance::setCurrentModuleInstance(module); 280 287 DynLib* dynLib = this->dynLibManager_->load(module->getName()); … … 298 305 void Core::unloadModule(ModuleInstance* module) 299 306 { 307 orxout(internal_info) << "Unloading module " << module->getName() << "..." << endl; 308 300 309 module->unloadAllStaticallyInitializedInstances(); 301 310 module->deleteAllStaticallyInitializedInstances(); -
code/branches/core7/src/libraries/core/DynLib.cc
r10523 r10527 68 68 { 69 69 // Log library load 70 orxout(internal_info) << " Loading module" << mName << endl;70 orxout(internal_info) << "load DynLib " << mName << endl; 71 71 72 72 std::string name = mName; … … 101 101 { 102 102 // Log library unload 103 orxout(internal_info) << " Unloading module" << mName << endl;103 orxout(internal_info) << "unload DynLib " << mName << endl; 104 104 105 105 if (DYNLIB_UNLOAD( m_hInst )) -
code/branches/core7/src/libraries/core/Game.cc
r10524 r10527 142 142 GameStateFactory::getFactories().clear(); 143 143 safeObjectDelete(&config_); 144 //if (this->core_)145 //this->core_->unloadModules();144 if (this->core_) 145 this->core_->unloadModules(); 146 146 safeObjectDelete(&core_); 147 147 safeObjectDelete(&gameClock_);
Note: See TracChangeset
for help on using the changeset viewer.