1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Fix most of memleaks discovered by valgrind

This commit is contained in:
Ivan Savenko
2023-11-13 12:09:55 +02:00
parent 1192dbff15
commit 20ef3a69e7
18 changed files with 58 additions and 27 deletions

View File

@@ -726,11 +726,11 @@ CGameInfoCallback::CGameInfoCallback(CGameState * GS):
{
}
std::shared_ptr<const boost::multi_array<ui8, 3>> CPlayerSpecificInfoCallback::getVisibilityMap() const
{
//boost::shared_lock<boost::shared_mutex> lock(*gs->mx);
return gs->getPlayerTeam(*getPlayerID())->fogOfWarMap;
}
//std::shared_ptr<const boost::multi_array<ui8, 3>> CPlayerSpecificInfoCallback::getVisibilityMap() const
//{
// //boost::shared_lock<boost::shared_mutex> lock(*gs->mx);
// return gs->getPlayerTeam(*getPlayerID())->fogOfWarMap;
//}
int CPlayerSpecificInfoCallback::howManyTowns() const
{