fix emergemanager memory leaks

master
sapier 2013-04-07 21:01:19 +02:00 committed by kwolekr
parent 04c3b17c78
commit 7d002b60ff
2 changed files with 17 additions and 1 deletions

View File

@ -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;
}

View File

@ -2494,6 +2494,8 @@ ServerMap::~ServerMap()
delete chunk;
}
#endif
delete m_mgparams;
}
bool ServerMap::initBlockMake(BlockMakeData *data, v3s16 blockpos)