Core/Battlefield: Fix some memory leaks
This commit is contained in:
@@ -60,6 +60,13 @@ Battlefield::Battlefield()
|
|||||||
|
|
||||||
Battlefield::~Battlefield()
|
Battlefield::~Battlefield()
|
||||||
{
|
{
|
||||||
|
for (BfCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
|
||||||
|
delete itr->second;
|
||||||
|
|
||||||
|
for (GraveyardVect::const_iterator itr = m_GraveyardList.begin(); itr != m_GraveyardList.end(); ++itr)
|
||||||
|
delete *itr;
|
||||||
|
|
||||||
|
m_capturePoints.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called when a player enters the zone
|
// Called when a player enters the zone
|
||||||
|
|||||||
@@ -37,6 +37,9 @@ BattlefieldWG::~BattlefieldWG()
|
|||||||
{
|
{
|
||||||
for (Workshop::const_iterator itr = WorkshopsList.begin(); itr != WorkshopsList.end(); ++itr)
|
for (Workshop::const_iterator itr = WorkshopsList.begin(); itr != WorkshopsList.end(); ++itr)
|
||||||
delete *itr;
|
delete *itr;
|
||||||
|
|
||||||
|
for (GameObjectBuilding::const_iterator itr = BuildingsInZone.begin(); itr != BuildingsInZone.end(); ++itr)
|
||||||
|
delete *itr;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BattlefieldWG::SetupBattlefield()
|
bool BattlefieldWG::SetupBattlefield()
|
||||||
|
|||||||
Reference in New Issue
Block a user