void wxApp::CleanUp()
{
//// COMMON CLEANUP
+
+ // flush the logged messages if any
+ wxLog *pLog = wxLog::GetActiveTarget();
+ if ( pLog != NULL && pLog->HasPendingMessages() )
+ pLog->Flush();
+
+ // One last chance for pending objects to be cleaned up
+ wxTheApp->DeletePendingObjects();
+
wxModule::CleanUpModules();
#if wxUSE_WX_RESOURCES
{
retValue = wxTheApp->OnRun();
}
+ else
+ // We want to initialize, but not run or exit immediately.
+ return 1;
}
//else: app initialization failed, so we skipped OnRun()
wxTheApp->OnExit();
- // flush the logged messages if any
- wxLog *pLog = wxLog::GetActiveTarget();
- if ( pLog != NULL && pLog->HasPendingMessages() )
- pLog->Flush();
-
-
wxApp::CleanUp();
return retValue;