Commit 7a2a0e7f authored by David Gobbi's avatar David Gobbi

BUG: fix memory leak

parent 16c18e22
......@@ -121,7 +121,7 @@ private:
};
//--------------------------------------------------------------------------
vtkCxxRevisionMacro(vtkMINCImageAttributes, "1.5");
vtkCxxRevisionMacro(vtkMINCImageAttributes, "1.6");
vtkStandardNewMacro(vtkMINCImageAttributes);
vtkCxxSetObjectMacro(vtkMINCImageAttributes,ImageMin,vtkDoubleArray);
......@@ -870,6 +870,8 @@ void vtkMINCImageAttributes::SetAttributeValueAsString(
strcpy(array->GetPointer(0), value);
this->SetAttributeValueAsArray(variable, attribute, array);
array->Delete();
}
//-------------------------------------------------------------------------
......@@ -883,6 +885,8 @@ void vtkMINCImageAttributes::SetAttributeValueAsInt(
array->SetValue(0, value);
this->SetAttributeValueAsArray(variable, attribute, array);
array->Delete();
}
//-------------------------------------------------------------------------
......@@ -896,6 +900,8 @@ void vtkMINCImageAttributes::SetAttributeValueAsDouble(
array->SetValue(0, value);
this->SetAttributeValueAsArray(variable, attribute, array);
array->Delete();
}
//-------------------------------------------------------------------------
......
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