Core/Maps: Unload transports in MapManager::UnloadAll instead of singleton destructor.

Core/Transports: Properly delink units from transports on transport desutruction. - Thanks to Shauren for help.
Core/ObjectAccessor: Unload corpse 'storage' in added UnloadAll method called in WorldRunnable postservice hook.
Core/Master: Change some postservice queries to syncrhonous (direct) execution to ensure execution on shutdown
Core/Master: Remove redundant calls to ACE::init and ACE::fini

These changes were made to fix crash/freeze issues on shutdown.
This commit is contained in:
Machiavelli
2011-01-16 00:08:52 +01:00
parent 58564cc496
commit 52cd2cbd7e
7 changed files with 37 additions and 33 deletions
+9 -5
View File
@@ -45,11 +45,6 @@ ObjectAccessor::ObjectAccessor()
ObjectAccessor::~ObjectAccessor()
{
for (Player2CorpsesMapType::const_iterator itr = i_player2corpse.begin(); itr != i_player2corpse.end(); ++itr)
{
itr->second->RemoveFromWorld();
delete itr->second;
}
}
WorldObject* ObjectAccessor::GetWorldObject(WorldObject const& p, uint64 guid)
@@ -385,6 +380,15 @@ void ObjectAccessor::Update(uint32 /*diff*/)
}
}
void ObjectAccessor::UnloadAll()
{
for (Player2CorpsesMapType::const_iterator itr = i_player2corpse.begin(); itr != i_player2corpse.end(); ++itr)
{
itr->second->RemoveFromWorld();
delete itr->second;
}
}
/// Define the static members of HashMapHolder
template <class T> UNORDERED_MAP< uint64, T* > HashMapHolder<T>::m_objectMap;