cRoot: Fixed a memory leak with cRankManager.
This commit is contained in:
parent
413e5c20fe
commit
a9e77fe7da
@ -154,7 +154,7 @@ void cRoot::Start(void)
|
||||
m_WebAdmin->Init();
|
||||
|
||||
LOGD("Loading settings...");
|
||||
m_RankManager = new cRankManager();
|
||||
m_RankManager.reset(new cRankManager());
|
||||
m_RankManager->Initialize(m_MojangAPI);
|
||||
m_CraftingRecipes = new cCraftingRecipes;
|
||||
m_FurnaceRecipe = new cFurnaceRecipe();
|
||||
|
@ -86,7 +86,7 @@ public:
|
||||
cPluginManager * GetPluginManager (void) { return m_PluginManager; } // tolua_export
|
||||
cAuthenticator & GetAuthenticator (void) { return m_Authenticator; }
|
||||
cMojangAPI & GetMojangAPI (void) { return m_MojangAPI; }
|
||||
cRankManager * GetRankManager (void) { return m_RankManager; }
|
||||
cRankManager * GetRankManager (void) { return m_RankManager.get(); }
|
||||
|
||||
/** Queues a console command for execution through the cServer class.
|
||||
The command will be executed in the tick thread
|
||||
@ -188,7 +188,9 @@ private:
|
||||
cPluginManager * m_PluginManager;
|
||||
cAuthenticator m_Authenticator;
|
||||
cMojangAPI m_MojangAPI;
|
||||
cRankManager * m_RankManager;
|
||||
|
||||
std::unique_ptr<cRankManager> m_RankManager;
|
||||
|
||||
cHTTPServer m_HTTPServer;
|
||||
|
||||
bool m_bStop;
|
||||
|
Loading…
Reference in New Issue
Block a user