From 7a77e00abe30e71c3a97f7a43b106c999ce9db87 Mon Sep 17 00:00:00 2001 From: cervenansky <> Date: Thu, 23 Jun 2011 14:55:46 +0000 Subject: [PATCH] some memory leaks --- .../bbsWxGUIEditorGraphic/GObjectsMVCFactory.cxx | 2 ++ .../bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx | 6 ++++-- .../bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx | 8 +++++++- .../bbsWxGUIEditorGraphic/wxGEditorTabPanel.h | 3 --- .../bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx | 1 - .../bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx | 3 ++- .../bbsWxGUIEditorGraphic/wxVtkSceneManager.h | 1 - 7 files changed, 15 insertions(+), 9 deletions(-) diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/GObjectsMVCFactory.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/GObjectsMVCFactory.cxx index d495b72..0b299b8 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/GObjectsMVCFactory.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/GObjectsMVCFactory.cxx @@ -82,6 +82,8 @@ namespace bbtk void GObjectsMVCFactory :: destroyInstance() { + //FCY memory leaks + delete instance; instance=NULL; } diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx index 76cfe77..57ef4b2 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/bbtkwxGUIEditorGraphicBBS.cxx @@ -39,8 +39,6 @@ Version: $Revision$ #include - - namespace bbtk { @@ -91,6 +89,10 @@ namespace bbtk //EED02JUIN2010 delete _tabsMgr; _frameAUIMgr->UnInit(); + // FCY memory leaks + delete _frameAUIMgr; + delete _notebook; + delete _tabsMgr; } diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx index c0255da..6ce48ef 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.cxx @@ -65,6 +65,9 @@ printf ("EED %p ~wxGEditorTabPanel()\n" , this ); //ED02JUIN2010 _sceneManager->disconnectDrop(); _panelsManager->VerifyLastTabPanel(); + //FCY memory leaks + delete _panelAUIMgr; + delete _sceneManager; } @@ -162,7 +165,10 @@ printf("EED wxGEditorTabPanel::initWxVtkCanvas 1\n"); void wxGEditorTabPanel::centerView() { - _sceneManager->centerView(); + if(_sceneManager) + { + _sceneManager->centerView(); + } } //========================================================================= diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h index 2ccf32d..43d4a19 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxGEditorTabPanel.h @@ -59,9 +59,6 @@ Version: $Revision$ //Includes std #include - - - namespace bbtk { diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx index faa28b6..33ad462 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxTabPanelsManager.cxx @@ -36,7 +36,6 @@ Version: $Revision$ #include "wxTabPanelsManager.h" - namespace bbtk { diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx index d2d1962..3740f98 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.cxx @@ -39,7 +39,6 @@ Version: $Revision$ #include #include - namespace bbtk { @@ -91,8 +90,10 @@ namespace bbtk wxVtkSceneManager::~wxVtkSceneManager() { + //FCY memory leaks printf ("EED %p ~wxVtkSceneManager()\n" , this ); disconnectDrop(); + delete _baseView; } //========================================================================= diff --git a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h index e44720c..ac27e88 100644 --- a/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h +++ b/lib/EditorGraphicBBS/bbsWxGUIEditorGraphic/wxVtkSceneManager.h @@ -84,7 +84,6 @@ Version: $Revision$ #include #include - namespace bbtk { class wxGEditorTabPanel; -- 2.45.0