[vtk-developers] Strange memory leaks with vtkImageReslice

David Gobbi dgobbi at atamai.com
Fri Apr 13 20:43:09 EDT 2007


Brad King wrote:
> David Gobbi wrote:
>   
>> Hi Mathieu,
>>
>> I can't find any reason for the leak that you have discovered, but I was
>> able to reproduce it.
>>
>> For me, it went away if I changed your code so that "slicer" is deleted
>> before "image".  You can try that as a temporary solution.
>>
>> I'll have to dig into the code to see what the actual source of the leak
>> is.  It is indeed a strange one.
>>     
>
> A reference loop is created but one of the links is not reported to the
> garbage collector.  vtkImageReslice should implement the
> ReportReferences method to report its InformationInput

Thanks, Brad.  I've added a ReportReference that fixes the memory leak.

 - David





More information about the vtk-developers mailing list