[vtkusers] RE: Upgraded to 5.0, now memory leaks...

Beau Sapach beau.sapach at ualberta.ca
Fri Jun 30 16:45:12 EDT 2006


One last experiment before I leave for the weekend.  If I start a blank C++
.NET project and run the same code:

 

vtkImageData * image = vtkImageData::New();

image->Delete();

 

then I get no memory leaks.  I don't know anything about .NET really and
would prefer to continue coding in straight Visual C++. Does this mean that
VTK 5 prefers .NET or is by default built for it?  Is the memory leakage I'm
seeing somehow related to garbage collection or the lack thereof in C++?

 

If ANYONE has answers, please share!  Thanks!


Beau

 

From: Beau Sapach [mailto:beau.sapach at ualberta.ca] 
Sent: Friday, June 30, 2006 1:04 PM
To: 'vtkusers at vtk.org'
Subject: RE: Upgraded to 5.0, now memory leaks...

 

Hello again everyone,

 

This is even more bizarre now,  it seems that if I create a blank MFC
application (dialog based) in Visual Studio I will get the same results as
below, if I simply create a vtk object and then delete it.

 

vtkImageData * image = vtkImageData::New();

image->Delete();

 

these are the only two lines of code under a single button on my form and I
get the same huge list of memory leaks.  What's going on??  Does anyone know
what's causing this?  Is this possibly a false-positive issue?  Many of the
memory leaks are for vtk objects that I've never even used, ever.  Any help
would be much appreciated.  Thanks!

 

Beau

 

From: Beau Sapach [mailto:beau.sapach at ualberta.ca] 
Sent: Friday, June 30, 2006 10:51 AM
To: 'vtkusers at vtk.org'
Subject: Upgraded to 5.0, now memory leaks...

 

Hello everyone,

 

I've just upgraded an application I'm developing to  VTK5 so that I can use
the vtkAVIWriter.  Seems to compile just fine now, with a couple of minor
tweaks.  But on exiting I get a massive amount of memory leaks.  Is this
possibly related to reference counting?  Is there a new way to delete
objects in VTK 5?

 

 

Beau

 

Here is a snippet of the memory leak output from Visual Studio:

 

Detected memory leaks!

Dumping objects ->

{93220} normal block at 0x03247208, 12 bytes long.

 Data: <RAW_SCALARS > 52 41 57 5F 53 43 41 4C 41 52 53 00 

{93219} normal block at 0x032470A0, 296 bytes long.

 Data: <                > B4 20 18 10 01 00 00 00 00 CD CD CD BE 0F 00 00 

{92786} normal block at 0x031EC638, 12 bytes long.

 Data: <RAW_SCALARS > 52 41 57 5F 53 43 41 4C 41 52 53 00 

{92785} normal block at 0x031EC4D0, 296 bytes long.

 Data: <                > B4 20 18 10 01 00 00 00 00 CD CD CD D8 0E 00 00 

{92350} normal block at 0x03191A20, 12 bytes long.

 Data: <RAW_SCALARS > 52 41 57 5F 53 43 41 4C 41 52 53 00 

{92349} normal block at 0x031918B8, 296 bytes long.

 Data: <                > B4 20 18 10 01 00 00 00 00 CD CD CD F2 0D 00 00 

{91914} normal block at 0x030DED58, 12 bytes long.

 Data: <RAW_SCALARS > 52 41 57 5F 53 43 41 4C 41 52 53 00 

{91913} normal block at 0x030DEBF0, 296 bytes long.

 Data: <                > B4 20 18 10 01 00 00 00 00 CD CD CD 0C 0D 00 00 

{8728} normal block at 0x02B53A18, 36 bytes long.

 Data: <<               > 3C C8 17 10 01 00 00 00 00 CD CD CD 01 00 00 00 

{1084} normal block at 0x02AAE788, 16 bytes long.

 Data: <vtkXYPlotWidget > 76 74 6B 58 59 50 6C 6F 74 57 69 64 67 65 74 00 

{1083} normal block at 0x02AAE738, 16 bytes long.

 Data: <vtkSplineWidget > 76 74 6B 53 70 6C 69 6E 65 57 69 64 67 65 74 00 

{1082} normal block at 0x02AAE6E8, 16 bytes long.

 Data: <vtkSphereWidget > 76 74 6B 53 70 68 65 72 65 57 69 64 67 65 74 00 

{1081} normal block at 0x02AAE698, 19 bytes long.

 Data: <vtkScalarBarWidg> 76 74 6B 53 63 61 6C 61 72 42 61 72 57 69 64 67 

{1080} normal block at 0x02AAE648, 15 bytes long.

 Data: <vtkPointWidget > 76 74 6B 50 6F 69 6E 74 57 69 64 67 65 74 00 

{1079} normal block at 0x02AAE5F8, 15 bytes long.

 Data: <vtkPlaneWidget > 76 74 6B 50 6C 61 6E 65 57 69 64 67 65 74 00 

{1078} normal block at 0x02AAE5A0, 27 bytes long.

 Data: <vtkOrientationMa> 76 74 6B 4F 72 69 65 6E 74 61 74 69 6F 6E 4D 61 

{1077} normal block at 0x02AAE550, 14 bytes long.

 Data: <vtkLineWidget > 76 74 6B 4C 69 6E 65 57 69 64 67 65 74 00 

{1076} normal block at 0x02AAE4F8, 23 bytes long.

 Data: <vtkImplicitPlane> 76 74 6B 49 6D 70 6C 69 63 69 74 50 6C 61 6E 65

 

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


More information about the vtkusers mailing list