[vtkusers] vtk memory leaks?

Alex Malyushytskyy alexmalvtk at gmail.com
Tue Jul 2 20:44:17 EDT 2013


I am not sure enabling VTK_DEBUG_LEAKS for a single project will help.
Personally I enabled appropriate option in CMAKE when building VTK.
It does work for a version I am working with (5.8.0 )

It is easy to check. Write a simple program  (get any test) which
instantiate any vtkObject subclass and exit.
If you do not see message box with leaks report your vtk is not configured
right.
AFAIK there were some changes in later version, so comments above may not
be relevant to your version though.

I do not think delay load option may affect this. All you need is to make
sure they are loaded before any vtk object is instantiated.
To be sure load them normally for test purposes.

Regards,

Alex



On Tue, Jul 2, 2013 at 12:13 PM, Mike Gagnon <mike at gagnon.com> wrote:

> Hi vtk pros!
>
> I am getting a lot of memory leaks in my code - and I've replaced every
> possible call to vtkWhateverObject::New to vtkSmartPointer<**vtkWhateverObject>::New
> (and commented out all calls to corresponding Deletes().
>
> I'm thinking these must be false positives.  I tried to rebuild the
> vtkCommon project with the -DVTK_DEBUG_LEAKS  flag set - and I also set
> this flag in my own project - but I don't get the window showing memory
> leaks.  Have I done this right to see memory leaks?
>
> Also, I've copied the project settings from the sample that was built from
> a CMake-generated project.  Amongst other project settings, the following
> dlls are under the DelayLoad properties: vtkRendering.dll;vtkIO.dll;**
> vtkFiltering.dll;vtkCommon.**dll.  I mention this because I read
> somewhere that the order of libraries loaded somehow affects the memory
> leak reporting...
>
> I'd like to figure out how to see zero leaks in the output window (VS2012)
> like I see in the vtk samples so that I can see when I get any other
> (real?) leaks...
>
> Thanks a lot,
> Mike
> ______________________________**_________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/**
> opensource/opensource.html<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 <http://www.vtk.org/Wiki/VTK_FAQ>
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/**listinfo/vtkusers<http://www.vtk.org/mailman/listinfo/vtkusers>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130702/b4db9fb5/attachment.htm>


More information about the vtkusers mailing list