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:
@@ -486,6 +486,12 @@ bool wxApp::UnregisterWindowClasses()
|
|||||||
|
|
||||||
void wxApp::CleanUp()
|
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__)
|
#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
|
||||||
wxSetKeyboardHook(FALSE);
|
wxSetKeyboardHook(FALSE);
|
||||||
#endif
|
#endif
|
||||||
@@ -517,8 +523,6 @@ void wxApp::CleanUp()
|
|||||||
|
|
||||||
delete wxWinHandleHash;
|
delete wxWinHandleHash;
|
||||||
wxWinHandleHash = NULL;
|
wxWinHandleHash = NULL;
|
||||||
|
|
||||||
wxAppBase::CleanUp();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user