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