From 7f8ce1d80950b2bd680d0f8cc8ad44e4835e0d1a Mon Sep 17 00:00:00 2001 From: megamage Date: Thu, 6 Aug 2009 17:45:37 -0500 Subject: [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 --- src/game/ObjectAccessor.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/game/ObjectAccessor.cpp') 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) -- cgit v1.2.3