[vtkusers] Memory leak only happens in release, not in debug

Hong Yi hongyi at renci.org
Wed Oct 26 11:29:37 EDT 2011


I run into a very annoying memory leak problem that only happens when running in release and works perfectly when running in debug. The problem happens when I load a different set of multiple data files for analysis without exiting the tool. What I did is to delete every vtk object such as PolyData, actors, mappers, etc., previously allocated for the previously loaded datasets before loading new datasets and allocate memory again for the new datasets. Since the memory leak problem does not happen when running in debug but only happens when running in release (specifically, the memory grows gradually until it runs out of system memory when running in release), I cannot really debug this memory leak problem in the usual way. The thing that puzzles me is that memory usage is normal and there is no memory leak at all when running in debug, but happens only in release most of the times. Sometimes memory leak does not happen even in release which seems to occur only when I test it in release within Visual Studio IDE right after I test it in debug. I am hoping to get some suggestions and tips on how to go about tracking down this memory leak problem.

Thank you very much for any suggestions and tips on tracking down this memory leak problem.

Hong


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111026/4b94a8ef/attachment.htm>


More information about the vtkusers mailing list