fix memory leak of wxMessageOutput if wxApp::OnInit() returned false

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-11-08 01:02:48 +00:00
parent 6dc2a916df
commit 2ee96a251c
2 changed files with 4 additions and 5 deletions

View File

@@ -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;
}

View File

@@ -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);