mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 13:20:27 -06:00
Fixed a few memory leaks. Made Init and Shutdown functions for some core systems.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5064 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -57,7 +57,6 @@ IMPLEMENT_APP(DolphinApp)
|
||||
#endif
|
||||
|
||||
CFrame* main_frame = NULL;
|
||||
LogManager *logManager = NULL;
|
||||
|
||||
#ifdef WIN32
|
||||
//Has no error handling.
|
||||
@ -106,7 +105,6 @@ bool DolphinApp::OnInit()
|
||||
wxString padPluginFilename;
|
||||
wxString wiimotePluginFilename;
|
||||
|
||||
|
||||
// Detect CPU info and write it to the cpu_info struct
|
||||
cpu_info.Detect();
|
||||
|
||||
@ -116,6 +114,11 @@ bool DolphinApp::OnInit()
|
||||
_CrtSetDbgFlag(tmpflag);
|
||||
#endif
|
||||
|
||||
LogManager::Init();
|
||||
EventHandler::Init();
|
||||
SConfig::Init();
|
||||
CPluginManager::Init();
|
||||
|
||||
// Register message box handler
|
||||
#if ! defined(_WIN32) && defined(HAVE_WX) && HAVE_WX
|
||||
RegisterMsgAlertHandler(&wxMsgAlert);
|
||||
@ -484,6 +487,16 @@ void DolphinApp::OnEndSession()
|
||||
SConfig::GetInstance().SaveSettings();
|
||||
}
|
||||
|
||||
int DolphinApp::OnExit()
|
||||
{
|
||||
CPluginManager::Shutdown();
|
||||
SConfig::Shutdown();
|
||||
EventHandler::Shutdown();
|
||||
LogManager::Shutdown();
|
||||
|
||||
return wxApp::OnExit();
|
||||
}
|
||||
|
||||
|
||||
// ------------
|
||||
// Talk to GUI
|
||||
|
Reference in New Issue
Block a user