[vtk-developers] Python wrappers are leaking

Andy Cedilnik andy.cedilnik at kitware.com
Fri Nov 29 10:06:56 EST 2002


Hi All,

(David)

Python wrappers are leaking. Not the wrapping process itself, but the
wrapped classes that are created. For example:

PYTHONPATH=/home/andy/vtk/VTK/Wrapping/Python:/home/andy/vtk/VTK-gcc/bin
/usr/bin/python
Python 2.1.3 (#1, Jul 29 2002, 22:34:51) 
[GCC 2.95.4 20011002 (Debian prerelease)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> import vtk
>>> 
vtkDebugLeaks has detected LEAKS!
Class vtkHashMap has 2 instances still around.
Class vtkVector has 778 instances still around.

This is using debug leaks. I tried creating some objects:

Python 2.1.3 (#1, Jul 29 2002, 22:34:51) 
[GCC 2.95.4 20011002 (Debian prerelease)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> import vtk
>>> def foo():
...   a = vtk.vtkActor()
...   print a
... 
>>> foo()
vtkOpenGLActor (0x810f9a8)
  Debug: Off
  Modified Time: 2
  Reference Count: 2
  Registered Events: (none)
  Dragable: On
  Pickable: On
  AllocatedRenderTime: 10
  EstimatedRenderTime: 0
  NumberOfConsumers: 0
  RenderTimeMultiplier: 1
  Visibility: On
  IsIdentity: true
  Position: (0, 0, 0)
  Orientation: (0, 0, 0)
  Origin: (0, 0, 0)
  Scale: (1, 1, 1)
  Bounds: 
    Xmin,Xmax: (-1, 1)
    Ymin,Ymax: (-1, 1)
    Zmin,Zmax: (-1, 1)
  UserTransform: (none)
  UserMatrix: (none)
  Mapper: (none)
  Property: (none)
  Texture: (none)


>>> 
vtkDebugLeaks has detected LEAKS!
Class vtkHashMap has 2 instances still around.
Class vtkVector has 778 instances still around.

And you can see, no leak of actor.
So, could somebody look at the map of objects why is it not getting
deleted?

				Andy




More information about the vtk-developers mailing list