Core: Remove an annoying memoryleak in OutdoorPVPMgr (Patch by Raczman)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user