MPEG writer is leaking memory
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
When writing out a movie, the MPEG writer is not releasing memory of the different images until the whole movie is generated.
Looks like a minor logic error: although the MPEG writer has code meant to release images from the has h table, this code is not using the erase method properly.
Suggest using the method with single parameter as proposed in following patch.
Fixed problem on local copy.
=================================================================== RCS file: /cvsroot/VTK/VTK/IO/vtkMPEG2Writer.cxx,v retrieving revision 1.3 diff -u -3 -r1.3 vtkMPEG2Writer.cxx --- IO/vtkMPEG2Writer.cxx 23 Aug 2005 13:42:26 -0000 1.3 +++ IO/vtkMPEG2Writer.cxx 25 May 2006 01:57:44 -0000 @@ -155,7 +155,7 @@ { return 0; }
- this->ImagesMap.erase(it, it);
- this->ImagesMap.erase(it); return 0; } //---------------------------------------------------------------------------