diff options
-rw-r--r-- | src/client.cpp | 16 | ||||
-rw-r--r-- | src/statuseffect.cpp | 2 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/client.cpp b/src/client.cpp index 44df362e..8d916add 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -435,14 +435,6 @@ Client::~Client() // Shutdown sound sound.close(); - // Unload XML databases - ColorDB::unload(); - EmoteDB::unload(); - ItemDB::unload(); - MonsterDB::unload(); - NPCDB::unload(); - StatusEffect::unload(); - ResourceManager::deleteInstance(); SDL_FreeSurface(mIcon); @@ -583,6 +575,14 @@ int Client::exec() { delete game; game = 0; + + // Unload XML databases + ColorDB::unload(); + EmoteDB::unload(); + ItemDB::unload(); + MonsterDB::unload(); + NPCDB::unload(); + StatusEffect::unload(); } mOldState = mState; diff --git a/src/statuseffect.cpp b/src/statuseffect.cpp index 66e8010d..49619f8a 100644 --- a/src/statuseffect.cpp +++ b/src/statuseffect.cpp @@ -169,6 +169,8 @@ void unloadMap(std::map<int, StatusEffect *> map) for (it = map.begin(); it != map.end(); it++) delete (*it).second; + + map.clear(); } void StatusEffect::unload() |