on the stack, so the assumption of dynamic creation cannot be made).
The default close event handler for wxFrame destroys the frame using Destroy().
-%
-%Under Windows, wxDialog defines a handler for \helpref{wxWindow::OnCharHook}{wxwindowoncharhook} that
-%generates a Cancel event if the Escape key has been pressed.
\wxheading{What should I do when the user calls up Exit from a menu?}
\wxheading{How do I exit the application gracefully?}
-A wxWidgets application automatically exits when the designated top window, or the
-last frame or dialog, is destroyed. Put any application-wide cleanup code in \helpref{wxApp::OnExit}{wxapponexit} (this
+A wxWidgets application automatically exits when the last top level window
+(\helpref{wxFrame}{wxframe} or \helpref{wxDialog}{wxdialog}), is destroyed. Put
+any application-wide cleanup code in \helpref{wxApp::OnExit}{wxapponexit} (this
is a virtual function, not an event handler).
\wxheading{Do child windows get deleted automatically?}