From 90b2bcd02606cb901955c074cfe9c13dc48d12f8 Mon Sep 17 00:00:00 2001 From: srit Date: Thu, 24 Mar 2011 16:24:59 +0000 Subject: [PATCH] Put mDefaultLUTColor in smart pointer to avoid memory leak --- vv/vvToolStructureSetManager.cxx | 2 +- vv/vvToolStructureSetManager.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vv/vvToolStructureSetManager.cxx b/vv/vvToolStructureSetManager.cxx index 8c008ad..20ecad3 100644 --- a/vv/vvToolStructureSetManager.cxx +++ b/vv/vvToolStructureSetManager.cxx @@ -69,7 +69,7 @@ vvToolStructureSetManager::vvToolStructureSetManager(vvMainWindowBase * parent, mIsAllVisibleEnabled = false; mNumberOfVisibleROI = 0; mNumberOfVisibleContourROI = 0; - mDefaultLUTColor = vtkLookupTable::New(); + mDefaultLUTColor = vtkSmartPointer::New(); for(int i=0; iGetNumberOfTableValues(); i++) { double r = (rand()/(RAND_MAX+1.0)); double v = (rand()/(RAND_MAX+1.0)); diff --git a/vv/vvToolStructureSetManager.h b/vv/vvToolStructureSetManager.h index 6ea8808..8060e8f 100644 --- a/vv/vvToolStructureSetManager.h +++ b/vv/vvToolStructureSetManager.h @@ -72,7 +72,7 @@ protected: int mCurrentStructureSetIndex; clitk::DicomRT_ROI * mCurrentROI; vvROIActor * mCurrentROIActor; - vtkLookupTable * mDefaultLUTColor; + vtkSmartPointer mDefaultLUTColor; bool mIsAllVisibleEnabled; int mNumberOfVisibleROI; int mNumberOfVisibleContourROI; -- 2.47.1