mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Remove possible memleak with lingering outdoor pvp capturepoints - patch by ge0rg
--HG-- branch : trunk
This commit is contained in:
@@ -222,7 +222,11 @@ void OPvPCapturePoint::DeleteSpawns()
|
||||
void OutdoorPvP::DeleteSpawns()
|
||||
{
|
||||
for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
|
||||
{
|
||||
itr->second->DeleteSpawns();
|
||||
delete itr->second;
|
||||
}
|
||||
m_capturePoints.clear();
|
||||
}
|
||||
|
||||
OutdoorPvP::OutdoorPvP() : m_sendUpdate(true)
|
||||
|
||||
@@ -36,10 +36,7 @@ OutdoorPvPMgr::~OutdoorPvPMgr()
|
||||
{
|
||||
//sLog.outDebug("Deleting OutdoorPvPMgr");
|
||||
for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
|
||||
{
|
||||
(*itr)->DeleteSpawns();
|
||||
delete *itr;
|
||||
}
|
||||
}
|
||||
|
||||
void OutdoorPvPMgr::InitOutdoorPvP()
|
||||
|
||||
Reference in New Issue
Block a user