From: ptv Date: Mon, 14 Nov 2005 12:15:17 +0000 (+0000) Subject: remove view manager from memory when it become unused X-Git-Tag: V3_1_0a3~18 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=580378899bea42f8ad72d9a5a3bca58c31bcda68;p=modules%2Fgui.git remove view manager from memory when it become unused --- diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx index 87e483ecf..19d6fc62e 100644 --- a/src/LightApp/LightApp_Application.cxx +++ b/src/LightApp/LightApp_Application.cxx @@ -1856,3 +1856,12 @@ void LightApp_Application::onWCDestroyed( QObject* ob ) break; } } + +/*! redefined to remove view manager from memory */ +void LightApp_Application::removeViewManager( SUIT_ViewManager* vm ) +{ + disconnect( vm, SIGNAL( lastViewClosed( SUIT_ViewManager* ) ), + this, SLOT( onCloseView( SUIT_ViewManager* ) ) ); + STD_Application::removeViewManager( vm ); + delete vm; +} diff --git a/src/LightApp/LightApp_Application.h b/src/LightApp/LightApp_Application.h index ef00439de..ff42be4ff 100644 --- a/src/LightApp/LightApp_Application.h +++ b/src/LightApp/LightApp_Application.h @@ -79,6 +79,7 @@ public: void updateActions(); SUIT_ViewManager* getViewManager( const QString&, const bool ); + virtual void removeViewManager( SUIT_ViewManager* ); QWidget* getWindow( const int, const int = -1 ); QWidget* window( const int, const int = -1 ) const; void addWindow( QWidget*, const int, const int = -1 );