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:
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user