fixed cleanup order to behave correctly in presence of exceptions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e490e26798
commit
7a9dfa3c40
@ -486,6 +486,12 @@ bool wxApp::UnregisterWindowClasses()
|
||||
|
||||
void wxApp::CleanUp()
|
||||
{
|
||||
// all objects pending for deletion must be deleted first, otherwise we
|
||||
// would crash when they use wxWinHandleHash (and UnregisterWindowClasses()
|
||||
// call wouldn't succeed as long as any windows still exist), so call the
|
||||
// base class method first and only then do our clean up
|
||||
wxAppBase::CleanUp();
|
||||
|
||||
#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
|
||||
wxSetKeyboardHook(FALSE);
|
||||
#endif
|
||||
@ -517,8 +523,6 @@ void wxApp::CleanUp()
|
||||
|
||||
delete wxWinHandleHash;
|
||||
wxWinHandleHash = NULL;
|
||||
|
||||
wxAppBase::CleanUp();
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user