[vtk-developers] TestImageDataToStructuredGrid test fails with leaks
George Zagaris
george.zagaris at kitware.com
Fri Feb 25 14:01:07 EST 2011
Hi Dean,
Thanks for reporting this. I have fixed this issue and pushed to master.
Best,
George
>
> Message: 1
> Date: Thu, 24 Feb 2011 21:06:33 -0500
> From: "Dean Inglis" <dean.inglis at camris.ca>
> Subject: [vtk-developers] TestImageDataToStructuredGrid test fails
> with leaks
> To: <vtk-developers at vtk.org>
> Message-ID: <2DDB11DD02F948C9BBC2AFD8288DBD62 at Hyoid>
> Content-Type: text/plain; format=flowed; charset="iso-8859-1";
> reply-type=original
>
> Filtering/Testing/Cxx/TestImageDataToStructuredGrid.cxx
> has two memory bugs:
> 1) vtkUniformGrid* GetGrid( double *origin, double *spacing, int *ndim )
>
> returns a vtk object but there is no way to have it delete and
> within this function there is
> vtkDoubleArray* pntData = vtkDoubleArray::New();
> another object is thus created but not deleted locally.
>
> Perhaps changing the function signature to:
> void GetGrid( vtkUniformGrid* grid, double *origin, double *spacing, int
> *ndim )
> and then instantiate and delete the grid in the main calling function.
>
> Dean
>
>
>
>
More information about the vtk-developers
mailing list