mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 08:03:45 +01:00
fix emergemanager memory leaks
This commit is contained in:
parent
04c3b17c78
commit
7d002b60ff
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2494,6 +2494,8 @@ ServerMap::~ServerMap()
|
||||
delete chunk;
|
||||
}
|
||||
#endif
|
||||
|
||||
delete m_mgparams;
|
||||
}
|
||||
|
||||
bool ServerMap::initBlockMake(BlockMakeData *data, v3s16 blockpos)
|
||||
|
Loading…
Reference in New Issue
Block a user