Core: Remove an annoying memoryleak in OutdoorPVPMgr (Patch by Raczman)

This commit is contained in:
click
2012-03-25 04:20:53 +02:00
parent e37a4e5fe2
commit f5a9206b0e
3 changed files with 7 additions and 2 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ OutdoorPvPMgr::OutdoorPvPMgr()
//sLog->outDebug(LOG_FILTER_OUTDOORPVP, "Instantiating OutdoorPvPMgr");
}
OutdoorPvPMgr::~OutdoorPvPMgr()
void OutdoorPvPMgr::Die()
{
//sLog->outDebug(LOG_FILTER_OUTDOORPVP, "Deleting OutdoorPvPMgr");
for (OutdoorPvPSet::iterator itr = m_OutdoorPvPSet.begin(); itr != m_OutdoorPvPSet.end(); ++itr)
+4 -1
View File
@@ -42,12 +42,15 @@ class OutdoorPvPMgr
private:
OutdoorPvPMgr();
~OutdoorPvPMgr();
~OutdoorPvPMgr() {};
public:
// create outdoor pvp events
void InitOutdoorPvP();
// cleanup
void Die();
// called when a player enters an outdoor pvp area
void HandlePlayerEnterZone(Player* player, uint32 areaflag);
@@ -30,6 +30,7 @@
#include "MapManager.h"
#include "Timer.h"
#include "WorldRunnable.h"
#include "OutdoorPvPMgr.h"
#define WORLD_SLEEP_CONST 50
@@ -93,4 +94,5 @@ void WorldRunnable::run()
sMapMgr->UnloadAll(); // unload all grids (including locked in memory)
sObjectAccessor->UnloadAll(); // unload 'i_player2corpse' storage and remove from world
sScriptMgr->Unload();
sOutdoorPvPMgr->Die();
}