Page 1 of 1


Posted: Wed Aug 30, 2006 9:29 pm
by cpp
After writting several applications with wxWidgets, i cant belive i "missed" this:
if i override wxApp::OnExit() on my own applications class (wich i allways do). Do i have to call the base class??

Code: Select all

int MyApp::OnExit()
    // my own cleanup here...

    return wxApp::OnExit();
or can i safely ommit the call to the base class?

Posted: Wed Aug 30, 2006 10:12 pm
by DavidHart

Not such a silly question, but I'm fairly sure you don't. The app overview example doesn't; and single-stepping past the end of MyApp::OnExit() arrived in wxEntry (or more accurately wxEntryReal), which contains:
~CallOnExit() { wxTheApp->OnExit(); }

I think we're safe ;)