From 8d1bf3c7ff1a394107825b74e14a528454bd8a9c Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Sat, 30 Jul 2005 17:11:49 +0000 Subject: [PATCH] Move per display data cleanup to wxApp::CleanUp where it belongs. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/motif/app.cpp | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/motif/app.cpp b/src/motif/app.cpp index 4add04f7cf..fa41cfebee 100644 --- a/src/motif/app.cpp +++ b/src/motif/app.cpp @@ -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); }