- // don't call OnExit() if OnInit() failed
- return -1;
- }
-
- // app execution
- int retValue = wxTheApp->OnRun();
-
- // why should we do this? it doesn't close all window, just one of them and
- // this shouldn't be necessary anyhow...
-#if 0
- // close any remaining windows
- wxWindow *topWindow = wxTheApp->GetTopWindow();
- if ( topWindow )
- {
- // forcibly delete the window.
- topWindow->Destroy();
-
- // collect the dead objects
- wxTheApp->DeletePendingObjects();
- }
-#endif // 0
-
- // app clean up
- wxTheApp->OnExit();