Memory leak in FindClosestPoint and FindClosestPointWithinRadius of python vtk
Hi all,
The minimal code given below gives me a memory leak for FindClosestPoint and FindClosestPointWithinRadius.
- Problem is present with version 8.1.2 from pip: https://pypi.org/project/vtk/
- Problem is present with version 8.2.0 from here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#vtk
- Problem is not present with version 7.1.1 from here: https://www.lfd.uci.edu/~gohlke/pythonlibs/#vtk
- Python: 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)]
- System: Windows 10 Enterprise build 17763
import vtk
source = vtk.vtkSphereSource()
source.Update()
cell_locator = vtk.vtkCellLocator()
cell_locator.SetDataSet(source.GetOutput())
cell_locator.BuildLocator()
closest_point = [0.0, 0.0, 0.0]
cell = vtk.vtkGenericCell()
cell_id = vtk.mutable(0)
sub_id = vtk.mutable(0)
dist = vtk.mutable(0)
# Comment either the first or the second loop.
while True:
cell_locator.FindClosestPoint((0., 0., 0.), closest_point, cell, cell_id, sub_id, dist)
while True:
cell_locator.FindClosestPointWithinRadius((0., 0., 0.), 1., closest_point, cell, cell_id, sub_id, dist)