summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game-server/itemmanager.h3
-rw-r--r--src/game-server/main-game.cpp4
-rw-r--r--src/game-server/monstermanager.h7
3 files changed, 11 insertions, 3 deletions
diff --git a/src/game-server/itemmanager.h b/src/game-server/itemmanager.h
index 9eee326e..cc4fb0ae 100644
--- a/src/game-server/itemmanager.h
+++ b/src/game-server/itemmanager.h
@@ -58,6 +58,9 @@ class ItemManager
mItemDatabaseVersion(0)
{}
+ ~ItemManager()
+ { deinitialize(); }
+
/**
* Loads item reference file.
*/
diff --git a/src/game-server/main-game.cpp b/src/game-server/main-game.cpp
index 6b4ae8fa..529e0690 100644
--- a/src/game-server/main-game.cpp
+++ b/src/game-server/main-game.cpp
@@ -249,8 +249,8 @@ static void deinitializeServer()
// Destroy Managers
delete stringFilter;
- monsterManager->deinitialize();
- itemManager->deinitialize();
+ delete monsterManager; monsterManager = 0;
+ delete itemManager; itemManager = 0;
delete skillManager; skillManager = 0;
MapManager::deinitialize();
StatusManager::deinitialize();
diff --git a/src/game-server/monstermanager.h b/src/game-server/monstermanager.h
index f04a5733..07ebb58f 100644
--- a/src/game-server/monstermanager.h
+++ b/src/game-server/monstermanager.h
@@ -30,8 +30,13 @@ class MonsterClass;
class MonsterManager
{
public:
+ MonsterManager(const std::string &file):
+ mMonsterReferenceFile(file)
+ {}
+
+ ~MonsterManager()
+ { deinitialize(); }
- MonsterManager(const std::string &file) : mMonsterReferenceFile(file) {}
/**
* Loads monster reference file.
*/