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()
|
void OutdoorPvP::DeleteSpawns()
|
||||||
{
|
{
|
||||||
for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
|
for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr)
|
||||||
|
{
|
||||||
itr->second->DeleteSpawns();
|
itr->second->DeleteSpawns();
|
||||||
|
delete itr->second;
|
||||||
|
}
|
||||||
|
m_capturePoints.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
OutdoorPvP::OutdoorPvP() : m_sendUpdate(true)
|
OutdoorPvP::OutdoorPvP() : m_sendUpdate(true)
|
||||||
|
|||||||
@@ -36,11 +36,8 @@ OutdoorPvPMgr::~OutdoorPvPMgr()
|
|||||||
{
|
{
|
||||||
//sLog.outDebug("Deleting OutdoorPvPMgr");
|
//sLog.outDebug("Deleting OutdoorPvPMgr");
|
||||||
for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
|
for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
|
||||||
{
|
|
||||||
(*itr)->DeleteSpawns();
|
|
||||||
delete *itr;
|
delete *itr;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void OutdoorPvPMgr::InitOutdoorPvP()
|
void OutdoorPvPMgr::InitOutdoorPvP()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user