mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
- proper destructors for handlers and lib objects
This commit is contained in:
@@ -73,11 +73,11 @@ CTown::CTown()
|
||||
|
||||
CTown::~CTown()
|
||||
{
|
||||
BOOST_FOREACH(auto build, buildings)
|
||||
BOOST_FOREACH(auto & build, buildings)
|
||||
build.second.dellNull();
|
||||
|
||||
BOOST_FOREACH(CStructure * str, clientInfo.structures)
|
||||
delete str;
|
||||
BOOST_FOREACH(auto & str, clientInfo.structures)
|
||||
str.dellNull();
|
||||
}
|
||||
|
||||
CTownHandler::CTownHandler()
|
||||
@@ -85,6 +85,12 @@ CTownHandler::CTownHandler()
|
||||
VLC->townh = this;
|
||||
}
|
||||
|
||||
CTownHandler::~CTownHandler()
|
||||
{
|
||||
BOOST_FOREACH(auto faction, factions)
|
||||
faction.dellNull();
|
||||
}
|
||||
|
||||
JsonNode readBuilding(CLegacyConfigParser & parser)
|
||||
{
|
||||
JsonNode ret;
|
||||
|
||||
Reference in New Issue
Block a user