fix emergemanager memory leaks
This commit is contained in:
parent
04c3b17c78
commit
7d002b60ff
|
@ -96,9 +96,23 @@ EmergeManager::~EmergeManager() {
|
||||||
delete emergethread[i];
|
delete emergethread[i];
|
||||||
delete mapgen[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 biomedef;
|
||||||
delete params;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2494,6 +2494,8 @@ ServerMap::~ServerMap()
|
||||||
delete chunk;
|
delete chunk;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
delete m_mgparams;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ServerMap::initBlockMake(BlockMakeData *data, v3s16 blockpos)
|
bool ServerMap::initBlockMake(BlockMakeData *data, v3s16 blockpos)
|
||||||
|
|
Loading…
Reference in New Issue