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:
donkopunchstania 2010-02-16 04:34:41 +00:00
parent 666a33eeed
commit 9254a2ddb5
12 changed files with 81 additions and 21 deletions

View file

@ -19,13 +19,15 @@ EventHandler::~EventHandler() {
EventHandler *EventHandler::GetInstance() {
// fprintf(stderr, "handler instance %p\n", m_Instance);
if (! m_Instance)
m_Instance = new EventHandler();
return m_Instance;
return m_Instance;
}
void EventHandler::Destroy() {
void EventHandler::Init()
{
m_Instance = new EventHandler();
}
void EventHandler::Shutdown() {
if (m_Instance)
delete m_Instance;
// fprintf(stderr, "deleting instance %p\n", m_Instance);