diff options
-rw-r--r-- | src/emerge.cpp | 16 | ||||
-rw-r--r-- | src/map.cpp | 2 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/emerge.cpp b/src/emerge.cpp index 499aaf291..9d3f94d48 100644 --- a/src/emerge.cpp +++ b/src/emerge.cpp @@ -96,9 +96,23 @@ EmergeManager::~EmergeManager() { delete emergethread[i]; delete mapgen[i]; } + emergethread.clear(); + + for (unsigned int i = 0; i < mapgen.size(); i++) + delete mapgen[i]; + mapgen.clear(); + + for (unsigned int i = 0; i < ores.size(); i++) + delete ores[i]; + ores.clear(); + for (std::map<std::string, MapgenFactory *>::iterator iter = mglist.begin(); + iter != mglist.end(); iter ++) { + delete iter->second; + } + mglist.clear(); + delete biomedef; - delete params; } diff --git a/src/map.cpp b/src/map.cpp index a8201f3ee..c4884a45a 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -2494,6 +2494,8 @@ ServerMap::~ServerMap() delete chunk; } #endif + + delete m_mgparams; } bool ServerMap::initBlockMake(BlockMakeData *data, v3s16 blockpos) |