Commit 9757e682 authored by David Gobbi's avatar David Gobbi
Browse files

15998: Fix mismatched new/free in vtkOpenGLImageSliceMapper.

By default, the SetArray() method uses free() rather than delete []
to release the memory, which in this case is allocated via new []
in the MakeTextureData() method.
parent 8c5c59e1
Pipeline #7213 passed with stage
......@@ -316,7 +316,8 @@ void vtkOpenGLImageSliceMapper::RenderTexturedPolygon(
id->SetExtent(0,xsize-1,0,ysize-1,0,0);
vtkUnsignedCharArray *uca = vtkUnsignedCharArray::New();
uca->SetNumberOfComponents(bytesPerPixel);
uca->SetArray(data,xsize*ysize*bytesPerPixel,reuseData);
uca->SetArray(data,xsize*ysize*bytesPerPixel,reuseData,
vtkAbstractArray::VTK_DATA_ARRAY_DELETE);
id->GetPointData()->SetScalars(uca);
uca->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