Commit bdb5b5b1 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit
Browse files

Fix leaks in vtkExtractArraysOverTime.

parent 6c877c2f
......@@ -370,6 +370,7 @@ static void vtkExtractArraysAddColumnValue(
arr->SetNumberOfTuples(1);
arr->SetVariantValue(0, val);
statSummary->AddColumn(arr);
arr->FastDelete();
}
//------------------------------------------------------------------------------
......@@ -962,12 +963,6 @@ void vtkExtractArraysOverTime::ExecuteAtTimeStep(
vtkDataObject* input = vtkDataObject::GetData(inInfo);
vtkSelection* selInput = vtkSelection::GetData(selInfo);
vtkDataObject* inputClone = input->NewInstance();
inputClone->ShallowCopy(input);
vtkSelection* selInputClone = selInput->NewInstance();
selInputClone->ShallowCopy(selInput);
vtkExtractSelection* filter = this->SelectionExtractor;
if (!filter)
{
......@@ -977,8 +972,8 @@ void vtkExtractArraysOverTime::ExecuteAtTimeStep(
}
filter->SetPreserveTopology(0);
filter->SetUseProbeForLocations(1);
filter->SetInputData(0, inputClone);
filter->SetInputData(1, selInputClone);
filter->SetInputData(0, input);
filter->SetInputData(1, selInput);
vtkDebugMacro(<< "Preparing subfilter to extract from dataset");
//pass all required information to the helper filter
......@@ -1012,8 +1007,6 @@ void vtkExtractArraysOverTime::ExecuteAtTimeStep(
this->Internal->AddTimeStep(time_step, output);
output->Delete();
inputClone->Delete();
selInputClone->Delete();
this->UpdateProgress(
static_cast<double>(this->CurrentTimeIndex)/this->NumberOfTimeSteps);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment