memory leak in vtkHyperStreamline
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Hi all,
I have found a memory leak in vtkHyperStreamline. The internal object this->Streamers is allocated via new each time Execute is called, however it is only deleted when the object itself is deleted. So if the vtkHyperStreamline object executes multiple times there is a leak, and also keeping even one copy of the Streamers around is very very memory intensive for some reason.
The attached script demonstrates the problem (you need to run top or similar at the same time and see how much memory is used). There are some lines in the script that you can uncomment to demonstrate the leak. I found that adding these lines to the end of the function vtkHyperStreamline::Execute() will fix the problem (must be after the call to BuildTube):
delete [] this->Streamers; this->Streamers = 0;
Thanks for looking into this!
Lauren O'Donnell