On Mon, Jun 15, 2009 at 9:35 AM, Norbert Stoop<norbert@...> wrote:
> Dear libmesh developers
> My Valgrind reports a couple of leaks in the VTKIO mesh input/output
> routines. Apparently, most (all?) VTK functions for adding elements to a
> grid require a pointer to the objects to be added, but internally the
> data is copied nevertheless. In other words, one manually has to clean
> up afterwards which is not always the case in vtk_io.C. Attached is a
> patch that makes my Valgrind happy.
> Please check if I free the _vtk_grid at the correct places (in
> particular the read function). AFAIK, _vtk_grid is not used across any
> of the functions. It should therefore be safe to free it at the end of
> the function where it is allocated (read, write and
> write_equation_systems), but like I said, I'm not sure...
Thanks very much for the patch. I'll be happy to check it in. Anyone
else who actually uses VTK output from Libmesh should also feel free
to comment, as I don't use it much myself.