Move per display data cleanup to wxApp::CleanUp where it belongs.
authorMattia Barbon <mbarbon@cpan.org>
Sat, 30 Jul 2005 17:11:49 +0000 (17:11 +0000)
committerMattia Barbon <mbarbon@cpan.org>
Sat, 30 Jul 2005 17:11:49 +0000 (17:11 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/motif/app.cpp

index 4add04f7cf2508837830c270bcddbff997a87707..fa41cfebee8c0ce2d33f6d60cb7c34ba779081cb 100644 (file)
@@ -102,10 +102,23 @@ bool wxApp::Initialize(int& argc, wxChar **argv)
 
 void wxApp::CleanUp()
 {
+    wxAppBase::CleanUp();
+
     delete wxWidgetHashTable;
     wxWidgetHashTable = NULL;
 
-    wxAppBase::CleanUp();
+    delete m_mainLoop;
+
+    for( wxPerDisplayDataMap::iterator it  = m_perDisplayData->begin(),
+                                       end = m_perDisplayData->end();
+         it != end; ++it )
+    {
+        delete it->second->m_visualInfo;
+        XtDestroyWidget( it->second->m_topLevelWidget );
+        delete it->second;
+    }
+
+    delete m_perDisplayData;
 }
 
 void wxApp::Exit()
@@ -133,19 +146,6 @@ wxApp::wxApp()
 
 wxApp::~wxApp()
 {
-    delete m_mainLoop;
-
-    for( wxPerDisplayDataMap::iterator it  = m_perDisplayData->begin(),
-                                       end = m_perDisplayData->end();
-         it != end; ++it )
-    {
-        delete it->second->m_visualInfo;
-        XtDestroyWidget( it->second->m_topLevelWidget );
-        delete it->second;
-    }
-
-    delete m_perDisplayData;
-
     wxApp::SetInstance(NULL);
 }