[Project64] Split up trace cleanup

This commit is contained in:
zilmar 2015-12-16 17:41:34 +11:00
parent 5c27d6d1e8
commit 77eb1eb75b
1 changed files with 5 additions and 1 deletions

View File

@ -136,7 +136,10 @@ void CleanupTrace(void)
g_Settings->UnregisterChangeCB(Debugger_TraceProtectedMEM, NULL, (CSettings::SettingChangedFunc)UpdateTraceLevel); g_Settings->UnregisterChangeCB(Debugger_TraceProtectedMEM, NULL, (CSettings::SettingChangedFunc)UpdateTraceLevel);
g_Settings->UnregisterChangeCB(Debugger_TraceUserInterface, NULL, (CSettings::SettingChangedFunc)UpdateTraceLevel); g_Settings->UnregisterChangeCB(Debugger_TraceUserInterface, NULL, (CSettings::SettingChangedFunc)UpdateTraceLevel);
g_Settings->UnregisterChangeCB(Debugger_AppLogFlush, g_LogFile, (CSettings::SettingChangedFunc)LogFlushChanged); g_Settings->UnregisterChangeCB(Debugger_AppLogFlush, g_LogFile, (CSettings::SettingChangedFunc)LogFlushChanged);
}
void TraceDone(void)
{
CloseTrace(); CloseTrace();
if (g_LogFile) { delete g_LogFile; g_LogFile = NULL; } if (g_LogFile) { delete g_LogFile; g_LogFile = NULL; }
} }
@ -183,6 +186,7 @@ void AppInit(CNotification * Notify)
void AppCleanup(void) void AppCleanup(void)
{ {
WriteTrace(TraceAppCleanup, TraceDebug, "cleaning up global objects"); WriteTrace(TraceAppCleanup, TraceDebug, "cleaning up global objects");
CleanupTrace();
if (g_Rom) { delete g_Rom; g_Rom = NULL; } if (g_Rom) { delete g_Rom; g_Rom = NULL; }
if (g_Plugins) { delete g_Plugins; g_Plugins = NULL; } if (g_Plugins) { delete g_Plugins; g_Plugins = NULL; }
@ -190,7 +194,7 @@ void AppCleanup(void)
if (g_Lang) { delete g_Lang; g_Lang = NULL; } if (g_Lang) { delete g_Lang; g_Lang = NULL; }
CMipsMemoryVM::FreeReservedMemory(); CMipsMemoryVM::FreeReservedMemory();
CleanupTrace(); TraceDone();
} }
void FixDirectories(void) void FixDirectories(void)