[vtkusers] VTK 5 and memory leaks

Beau Sapach beau.sapach at ualberta.ca
Tue Jul 4 18:05:32 EDT 2006


Hello everyone,

 

I've recently switched my application (Visual C++, Visual Studio 2003) over
to VTK5.0.0 and am getting huge memory leaks.  When I create a simple MFC
dialog app and create/destroy a VTK object:

 

vtkObject * ob = vtkObject::New();

ob->Delete();

 

I also get huge number of memory leaks.  So now I've recompiled my VTK
source with DEBUG_LEAKS turned ON.  When I print out memory leaks
immediately before exiting the simple dialog app I get this:

 

vtkDebugLeaks has detected LEAKS!

Class "vtkDebugLeaks" has 1 instance still around.

Class "vtkObjectFactoryCollection" has 1 instance still around.

 

The 3rd line is what worries me, is this normal?  Obviously the
vtkDebugLeaks object should still exist, but should the
vtkObjectFactoryCollection object be there?  If both of these are normal, is
it possible that Visual Studio is giving me false positives?  Is there
something possibly misconfigured?  I can't be the first/only person to
switch from VTK 4.4 to 5.0 while using VS 2003.. Has anyone else seen
this????

 

Beau

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060704/939236d3/attachment.htm>


More information about the vtkusers mailing list