diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index 35145e1e8f..663e7ea670 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -207,10 +207,6 @@ int wxAppConsole::OnExit() delete wxConfigBase::Set((wxConfigBase *) NULL); #endif // wxUSE_CONFIG - // use Set(NULL) and not Get() to avoid creating a message output object on - // demand when we just want to delete it - delete wxMessageOutput::Set(NULL); - return 0; } diff --git a/src/common/init.cpp b/src/common/init.cpp index f6cc91b350..9b87e18152 100644 --- a/src/common/init.cpp +++ b/src/common/init.cpp @@ -364,7 +364,10 @@ static void DoCommonPostCleanup() FreeConvertedArgs(); #endif // wxUSE_UNICODE - // Note: check for memory leaks is now done via wxDebugContextDumpDelayCounter + // use Set(NULL) and not Get() to avoid creating a message output object on + // demand when we just want to delete it + delete wxMessageOutput::Set(NULL); + #if wxUSE_LOG // and now delete the last logger as well delete wxLog::SetActiveTarget(NULL);