From 240cb67632b657a69a8a34c6de098bb35e2502e0 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 22 Jul 2013 13:56:41 +0000 Subject: [PATCH] Bug: mesh is not destructed (leaks) after element selection. + //! releaze myLastHighlitedActor and myLastPreHighlitedActor + void FreeActors(); --- src/SVTK/SVTK_InteractorStyle.cxx | 9 +++++++++ src/SVTK/SVTK_InteractorStyle.h | 3 +++ 2 files changed, 12 insertions(+) diff --git a/src/SVTK/SVTK_InteractorStyle.cxx b/src/SVTK/SVTK_InteractorStyle.cxx index 7f7f5e6e7..ea8c11bd3 100644 --- a/src/SVTK/SVTK_InteractorStyle.cxx +++ b/src/SVTK/SVTK_InteractorStyle.cxx @@ -160,6 +160,15 @@ SVTK_Selector* SVTK_InteractorStyle::GetSelector() return myInteractor->GetSelector(); } +/*! + Realeaze actors +*/ +void SVTK_InteractorStyle::FreeActors() +{ + myLastHighlitedActor = NULL; + myLastPreHighlitedActor = NULL; +} + /*! Generate special SVTK_SelectionEvent */ diff --git a/src/SVTK/SVTK_InteractorStyle.h b/src/SVTK/SVTK_InteractorStyle.h index 4070d5516..e4a069bdb 100644 --- a/src/SVTK/SVTK_InteractorStyle.h +++ b/src/SVTK/SVTK_InteractorStyle.h @@ -245,6 +245,9 @@ class SVTK_EXPORT SVTK_InteractorStyle: public vtkInteractorStyle void SetAdvancedZoomingEnabled( const bool theState ) { myIsAdvancedZoomingEnabled = theState; } bool IsAdvancedZoomingEnabled() const { return myIsAdvancedZoomingEnabled; } + //! releaze myLastHighlitedActor and myLastPreHighlitedActor + void FreeActors(); + protected: SVTK_InteractorStyle(); ~SVTK_InteractorStyle(); -- 2.39.2