From 4051aef42ed4ff514a8d84f1b2de5dc1ca4992b3 Mon Sep 17 00:00:00 2001 From: apo Date: Mon, 3 Oct 2005 06:20:41 +0000 Subject: [PATCH] To provide correct memory management --- src/SVTK/SVTK_RenderWindowInteractor.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/SVTK/SVTK_RenderWindowInteractor.cxx b/src/SVTK/SVTK_RenderWindowInteractor.cxx index 606c3d546..74a930ab0 100644 --- a/src/SVTK/SVTK_RenderWindowInteractor.cxx +++ b/src/SVTK/SVTK_RenderWindowInteractor.cxx @@ -61,8 +61,10 @@ using namespace std; #ifdef _DEBUG_ static int MYDEBUG = 0; +static int MYVTKDEBUG = 0; #else static int MYDEBUG = 0; +static int MYVTKDEBUG = 0; #endif static bool GENERATE_SUIT_EVENTS = false; @@ -409,10 +411,16 @@ SVTK_RenderWindowInteractor // Sequence of the destruction call are fixed and should be changed. // vtkRenderWindow instance should be destroyed after all vtkRenderer's + if(MYVTKDEBUG){ + getRenderWindow()->DebugOn(); + getRenderer()->DebugOn(); + GetDevice()->DebugOn(); + } GetDevice()->SetInteractorStyle(NULL); while(!myInteractorStyles.empty()){ const PInteractorStyle& aStyle = myInteractorStyles.top(); aStyle->SetInteractor(NULL); + if(MYVTKDEBUG) aStyle->DebugOn(); myInteractorStyles.pop(); } -- 2.39.2