[vtkusers] BUG(?): vtkProp3D

Patrick de Koning patrick at lkeb.azl.nl
Tue Jul 4 06:51:08 EDT 2000


I think I discovered a bug in vtkProp3D. When using the function
InitPathTraversal (which happens in vtkPicker) the prop is added to a
vtkAssemblyPaths which is also created. When you delete the prop, it
isn't deleted because it is still in the vtkAssemblyPath and you get
memory leaks.

The following will demonstrate the problem:

	vtkProp3D *prop = vtkProp3D::New();
	prop->Delete();

no problem.

if you try:

	vtkProp3D *prop = vtkProp3D::New();
	prop->InitPathTraversal();
	prop->Delete();

you get memory leaks.

To avoid these leaks I now use:

	vtkProp3D *prop = vtkProp3D::New();
	prop->InitPathTraversal();
	vtkAssemblyPath *path = prop->GetNextPath();
	path->RemoveAllItems();
	prop->Delete();

but this shouldn't be neccesary.

I don't now where or how this problem can be fixed, but I hope someone
out there knows the answer.

-- 
--------------------------------------------------------------------
Ir. P.J.H. de Koning                    Leiden University Medical Center
Department of Radiology, C2S            Division of Image Processing
P.O. Box 9600                           2300 RC  LEIDEN
the Netherlands                         Tel. +31-71-5266206  
Fax +31-71-5266801                      Email patrick at lkeb.azl.nl




More information about the vtkusers mailing list