[vtkusers] Memory leak

Jothybasu Selvaraj jothybasu at gmail.com
Tue May 15 10:23:12 EDT 2012


And I am using Qt4.8 with vtk5.10 RC4. I heard sometime ago that there is a
memory leak in vtk RC2/3(don't remember exactly which one) when used win Qt
applications.

Jothy


On Tue, May 15, 2012 at 3:19 PM, Jothybasu Selvaraj <jothybasu at gmail.com>wrote:

> Hi all,
>
> I have a pipeline like this, every time I call this function the memory
> increases ~10MB. How can I fix this?
>
> I have a imgData already instantiated like this
>
> vtkSmartPointer<vtkImageData>img=
>      vtkSmartPointer<vtkImageData>::New();
>
> vtkSmartPointer<vtkXMLImageReader>rd=
>      vtkSmartPointer<vtkXMLImageReader>::New();
> rd->SetFilename("filename");
> rd->Update();
>
> img=rd->GetOutput();
>
>
> //Now I repeat this function several times
>
>    vtkSmartPointer<vtkImageShiftScale>scaler=
>            vtkSmartPointer<vtkImageShiftScale>::New();
>    scaler->SetInput(img);*//is this correct way of doing?*
>
>    scaler->SetScale(0.5);//Multiply
>    scaler->SetOutputScalarTypeToDouble();
>
>    //scaler->ReleaseDataFlagOn();//Tried with this too
>    scaler->Update();
>
>    img=scaler->GetOutput();*//is this correct way of doing?*
>
> I am beginner in C++, so I am expecting some silly mistakes.
>
>
> Thanks
> --
> Jothy
>



-- 
Jothy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120515/f5918b74/attachment.htm>


More information about the vtkusers mailing list