aboutsummaryrefslogtreecommitdiff
path: root/src/game/ObjectAccessor.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-08-06 17:45:37 -0500
committermegamage <none@none>2009-08-06 17:45:37 -0500
commit7f8ce1d80950b2bd680d0f8cc8ad44e4835e0d1a (patch)
treec351b74f6b247e0edc25a4e566c011ac3717a1e7 /src/game/ObjectAccessor.cpp
parente8556b879d36ad8899d6eb40e98f6de6d420a275 (diff)
[8315] Fixed memory leaks (mostly at server shutdown) and code cleanups. Author: VladimirMangos
* Fixed leak in BattleGround::m_PlayerScores at BattleGround::Reset, add and use BattleGroundScoreMap typedef * Delete AreaTeam objects stored in global map at shutdown * Delete Corpse objects stored in global map at shutdown * Store guild bank log entries as objectes instead pointers in log event lists --HG-- branch : trunk
Diffstat (limited to 'src/game/ObjectAccessor.cpp')
-rw-r--r--src/game/ObjectAccessor.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/game/ObjectAccessor.cpp b/src/game/ObjectAccessor.cpp
index cd58d564106..43d3d0a1534 100644
--- a/src/game/ObjectAccessor.cpp
+++ b/src/game/ObjectAccessor.cpp
@@ -46,7 +46,11 @@ INSTANTIATE_SINGLETON_2(ObjectAccessor, CLASS_LOCK);
INSTANTIATE_CLASS_MUTEX(ObjectAccessor, ACE_Thread_Mutex);
ObjectAccessor::ObjectAccessor() {}
-ObjectAccessor::~ObjectAccessor() {}
+ObjectAccessor::~ObjectAccessor()
+{
+ for(Player2CorpsesMapType::const_iterator itr = i_player2corpse.begin(); itr != i_player2corpse.end(); ++itr)
+ delete itr->second;
+}
Creature*
ObjectAccessor::GetCreatureOrPetOrVehicle(WorldObject const &u, uint64 guid)