Re: [wxVTK] terrible memory leak problems with using vtk on wxwidgets
Brought to you by:
malat
From: Mathieu M. <mat...@gm...> - 2008-10-19 20:33:06
|
Hi Senthil, You should really read: http://www.catb.org/~esr/faqs/smart-questions.html So I am going to guess since you are using Visual Leak that your are on Win32. If you are on Win32, you may be suffering from the well know issue with MFC: http://www.vtk.org/pipermail/vtkusers/2007-May/090968.html False memory leak reports are caused by VTK dlls loading *before* MFC dlls. You have to use the linker's /delayload flag to avoid this issue. The /delayload flag should be correct by default in the MFC examples if you are using CVS VTK... If you are using a previous version of VTK (5.0 or earlier) then you will have to figure out a way to link with that flag. See the CVS version of files in VTK/GUISupport/MFC for details. Or grep the VTK source tree for "DELAYLOAD" Let us know if this solve your issue Thanks On Thu, Oct 9, 2008 at 12:49 AM, Premraj, Senthil Kumar <sen...@ui...> wrote: > Hello, > > > > I wrote an application in just a command line format using vtk and I was not > getting any memory leaks in it even if I did not call Delete() on any of the > filters or datastructures. But a similar code written with wxwidgets is > giving me tons and tons of memory leaks. I am using VTK 5.03 and wxwidgets > 2.6.3. All I am doing is creating an empty vtkPolyData* using the New() > method and pass the pointer around through various classes to bring it back > for displaying in my wxwidgets application( I don't do anything with it in > the wxwidgets class). When I close the application, VisualLeak detector is > pointing to the New() method like 12 times even though it should be called > only once. If I try to delete the polydata there is no memory leaks but of > course the second I actually do something to the polydata like make an ITK > image into that polydata, then the Delete() call makes my application crash. > If anyone could help me with it, it would be great. Thanks a lot in advance. > > > > Senthil > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Wxvtk-users mailing list > Wxv...@li... > https://lists.sourceforge.net/lists/listinfo/wxvtk-users > > -- Mathieu |