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:
1 parent
666a33eeed
commit
9254a2ddb5
12 files changed
+81
-21
No files matched your search
@@ -518,6 +518,8 @@ CFrame::~CFrame()
|
||||
#endif
|
||||
|
||||
ClosePages();
|
||||
|
||||
delete m_Mgr;
|
||||
}
|
||||
|
||||
void CFrame::OnQuit(wxCommandEvent& WXUNUSED (event))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -27,6 +27,7 @@ class DolphinApp : public wxApp
|
||||
public:
|
||||
bool OnInit();
|
||||
void OnEndSession();
|
||||
int OnExit();
|
||||
CFrame* GetCFrame();
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user