[vtkusers] VTK memory management

Thiago Franco Moraes tfmoraes at cti.gov.br
Wed Aug 29 16:03:47 EDT 2012


Hi,

I'm doing some tests about memory management in VTK with Python. I
wrote this little python script [1]. It takes as parameter a filename
to a vtkPolydata saved in a xml file and do some processings in it. In
this script I'm taking care of freeing the memory used by each filter
and intermediate vtkPolydata. I'm using an tool called memory profiler
(very interesting by the way) [2] to measure the memory used along the
script execution. The problem is the memory measurement in the end of
script execution is somewhat strange, because the memory measurement
is very fluctuating, ranging from 170MB to 500MB. Is this expected?
I'm freeing memory from vtk objects in the right way? It's a problem
with Python?

Thanks!

[1] - http://pastebin.com/iYUK1jxk
[2] - https://github.com/fabianp/memory_profiler



More information about the vtkusers mailing list