From ebd7428b4aae291e2bd8093a25da52cbe66a75ed Mon Sep 17 00:00:00 2001 From: geay Date: Fri, 18 Apr 2014 14:56:45 +0200 Subject: [PATCH] Last memory leak hunting before V7.4.0. --- src/Plugins/MEDReader/IO/vtkExtractGroup.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Plugins/MEDReader/IO/vtkExtractGroup.cxx b/src/Plugins/MEDReader/IO/vtkExtractGroup.cxx index 9bdba20e..785ff9e5 100644 --- a/src/Plugins/MEDReader/IO/vtkExtractGroup.cxx +++ b/src/Plugins/MEDReader/IO/vtkExtractGroup.cxx @@ -58,8 +58,6 @@ vtkStandardNewMacro(vtkExtractGroup); -vtkCxxSetObjectMacro(vtkExtractGroup, SIL, vtkMutableDirectedGraph); - /////////////////// class ExtractGroupStatus @@ -462,6 +460,16 @@ int vtkExtractGroup::RequestInformation(vtkInformation *request, vtkInformationV return 1; } +/*! + * Do not use vtkCxxSetObjectMacro macro because input mdg comes from an already managed in the pipeline just a ref on it. + */ +void vtkExtractGroup::SetSIL(vtkMutableDirectedGraph *mdg) +{ + if(this->SIL==mdg) + return ; + this->SIL=mdg; +} + template vtkDataSet *FilterFamilies(vtkDataSet *input, const std::set& idsToKeep, bool insideOut, const char *arrNameOfFamilyField, const char *associationForThreshold, bool& catchAll, bool& catchSmth) -- 2.39.2