[vtkusers] Memory leak

David E DeMarle dave.demarle at kitware.com
Tue May 15 10:33:01 EDT 2012


That leak was unrelated, and Clinton's fix for it was in rc4.

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Tue, May 15, 2012 at 10:23 AM, Jothybasu Selvaraj
<jothybasu at gmail.com> wrote:
> 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
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list