mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-05 15:48:51 +00: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:
parent
666a33eeed
commit
9254a2ddb5
12 changed files with 81 additions and 21 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue