-wxTopLevelWindowMGL::~wxTopLevelWindowMGL()
-{
- m_isBeingDeleted = true;
-
- wxTopLevelWindows.DeleteObject(this);
-
- if (wxTheApp->GetTopWindow() == this)
- wxTheApp->SetTopWindow(NULL);
-
- if ((wxTopLevelWindows.Number() == 0) &&
- (wxTheApp->GetExitOnFrameDelete()))
- {
- wxTheApp->ExitMainLoop();
- }
-}
-