Skip to content

Fix possible reference loops involving vtkCutter and vtkSphereTree

David Gobbi requested to merge dgobbi/vtk:cutter-leak into master

The vtkCutter has several member algorithms that it delegates to. Since vtkCutter holds references to these other algorithms (rather than just creating them temporarily during execution), and since they share the vtkCutter's input, they can result in reference loops via the pipeline. Therefore they must be reported to the garbage collector. Note that vtkGarbageCollectorReport() does not work with vtkNew (it lacks the necessary implementation).

The vtkSphereTree can also participate in reference loops due to its DataSet member, when a vtkAlgorithm holds a reference to a vtkSphereTree.

These fixes eliminate the memory leak in the FiltersCorePython-probe test (probe.py).

Closes #18599 (closed)
Closes #19403 (closed)
Closes #19377 (closed)

Edited by David Gobbi

Merge request reports

Loading