[vtkusers] vtkImageViewer2 with color transfer function memory leak

Mark Wyszomierski markww at gmail.com
Tue May 3 15:42:01 EDT 2005


Hi everyone,

I have been using vtkImageViewer2 and setting a color transfer
function in its WindowLevel member, to map colors. Unfortunately now I
notice a memory leak when I exit my app after using it. The leak
occurs only sometimes, which is very frustrating. If I disable the use
of the color map, there are no more leaks. I add it to my viewer like
so:

myColorTransferFunction = vtkColorTransferFunction::New();
viewer->GetWindowLevel()->SetOutputFormatToRGB();
viewer->GetWindowLevel()->SetLookupTable(myColorTransferFunction);

And at deconstruction time, I cleanup like:

viewer->Delete();
myColorTransferFunction->Delete();

The size of the leak is always exactly the size of one of my image
slices. Any info would be great, thanks,

Mark



More information about the vtkusers mailing list