1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

Fix memory leaks in library

This commit is contained in:
Ivan Savenko 2023-11-13 16:02:22 +02:00
parent af0afb251e
commit d4496c81f9
2 changed files with 3 additions and 0 deletions

View File

@ -318,6 +318,7 @@ CTownHandler::CTownHandler():
CTownHandler::~CTownHandler()
{
delete randomTown;
delete randomFaction;
}
JsonNode readBuilding(CLegacyConfigParser & parser)

View File

@ -166,6 +166,8 @@ CGameState::~CGameState()
// explicitly delete all ongoing battles first - BattleInfo destructor requires valid CGameState
currentBattles.clear();
map.dellNull();
scenarioOps.dellNull();
initialOpts.dellNull();
}
void CGameState::preInit(Services * services)