From e71d99aa2de2f844ea5ab4dbfc62e6c2cf6380f0 Mon Sep 17 00:00:00 2001 From: unitraxx Date: Thu, 12 Sep 2013 02:44:52 +0000 Subject: [PATCH] small clean up improvement git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/uni@13668 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/main.cpp | 2 +- src/online/http_manager.cpp | 2 +- src/online/http_manager.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index a9cec3141..5e3b82276 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1244,6 +1244,7 @@ void cleanSuperTuxKart() INetworkHttp::get()->stopNetworkThread(); if(Online::HTTPManager::isRunning()) Online::HTTPManager::get()->stopNetworkThread(); + //delete in reverse order of what they were created in. //see InitTuxkart() Online::ServersManager::deallocate(); @@ -1252,7 +1253,6 @@ void cleanSuperTuxKart() Online::CurrentUser::deallocate(); GUIEngine::DialogQueue::deallocate(); - Referee::cleanup(); if(ReplayPlay::get()) ReplayPlay::destroy(); if(race_manager) delete race_manager; diff --git a/src/online/http_manager.cpp b/src/online/http_manager.cpp index 5ea3b9300..28c686ed2 100644 --- a/src/online/http_manager.cpp +++ b/src/online/http_manager.cpp @@ -221,7 +221,7 @@ namespace Online{ delete request; } me->m_request_queue.unlock(); - + HTTPManager::deallocate(); pthread_exit(NULL); return 0; } // mainLoop diff --git a/src/online/http_manager.hpp b/src/online/http_manager.hpp index d0ace8875..3cd52b869 100644 --- a/src/online/http_manager.hpp +++ b/src/online/http_manager.hpp @@ -77,6 +77,7 @@ namespace Online{ static void *mainLoop(void *obj); void startNetworkThread(); + static void deallocate(); HTTPManager(); //const std::string &url ~HTTPManager(); @@ -86,7 +87,6 @@ namespace Online{ // singleton static HTTPManager* get(); - static void deallocate(); static bool isRunning(); //Execute