Fixing more implicit memory leaks to make it easier to look for the serious ones.

This commit is contained in:
lotodore
2011-02-28 23:47:33 +00:00
parent beb18d32b9
commit 14d951243b
+6 -1
View File
@@ -46,6 +46,7 @@
#include <boost/lambda/lambda.hpp>
#include <boost/filesystem.hpp>
#include <boost/bind.hpp>
#include <boost/foreach.hpp>
#include <boost/uuid/uuid.hpp>
#include <gsasl.h>
@@ -747,9 +748,13 @@ ServerLobbyThread::Main()
GetCallback().SignalNetServerError(e.GetErrorId(), e.GetOsErrorCode());
LOG_ERROR("Lobby exception: " << e.what());
}
// Clear all sessions.
// Clear all sessions and games.
m_sessionManager.Clear();
m_gameSessionManager.Clear();
BOOST_FOREACH(const GameMap::value_type& tmpGame, m_gameMap) {
tmpGame.second->Exit();
}
m_gameMap.clear();
// Cancel pending timer callbacks.
CancelTimers();
// Stop database engine.