_vtk.vtkOpenGLHardwareSelector selection leak
Getting leaks with the selection from vtkOpenGLHardwareSelector
with dev wheels vtk==9.0.20210612.dev0
on Windows 64-bit Python 3.9:
vtkDebugLeaks has detected LEAKS!
Class "vtkTypeInt64Array" has 16 instances still around.
Class "vtkInformationVector" has 15 instances still around.
Class "vtkMatrix3x3" has 2 instances still around.
Class "class vtkBuffer<__int64>" has 25 instances still around.
Class "vtkMatrix4x4" has 9 instances still around.
Class "vtkIdList" has 10 instances still around.
Class "vtkIdTypeArray" has 9 instances still around.
Class "vtkCellArray" has 8 instances still around.
Class "class vtkBuffer<unsigned char>" has 1 instance still around.
Class "vtkInformationIntegerValue" has 64 instances still around.
Class "vtkInformationExecutivePortValue" has 2 instances still around.
Class "vtkInformation" has 48 instances still around.
Class "vtkInformationExecutivePortVectorValue" has 1 instance still around.
Class "vtkCommand or subclass" has 1 instance still around.
Class "vtkInformationIterator" has 4 instances still around.
Class "class vtkBuffer<float>" has 2 instances still around.
Class "vtkFloatArray" has 2 instances still around.
Class "vtkTransform" has 4 instances still around.
Class "vtkUnsignedCharArray" has 1 instance still around.
Class "vtkCompositeDataPipeline" has 3 instances still around.
Class "vtkUniformInternals" has 3 instances still around.
Class "vtkTimerLog" has 2 instances still around.
Class "vtkOpenGLIndexBufferObject" has 10 instances still around.
Class "vtkOpenGLVertexArrayObject" has 10 instances still around.
Class "vtkOpenGLCellToVTKCellMap" has 1 instance still around.
Class "vtkOpenGLVertexBufferObjectGroup" has 1 instance still around.
Class "vtkOpenGLPolyDataMapper" has 1 instance still around.
Class "vtkAlgorithmOutput" has 2 instances still around.
Class "vtkInformationStringValue" has 1 instance still around.
Class "vtkEmptyCell" has 1 instance still around.
Class "vtkFieldData" has 2 instances still around.
Class "vtkPointData" has 1 instance still around.
Class "vtkCellData" has 1 instance still around.
Class "class vtkBuffer<double>" has 1 instance still around.
Class "vtkDoubleArray" has 1 instance still around.
Class "vtkPoints" has 2 instances still around.
Class "vtkPolyData" has 1 instance still around.
Class "vtkTrivialProducer" has 1 instance still around.
Class "vtkStreamingDemandDrivenPipeline" has 1 instance still around.
Class "vtkDataSetMapper" has 1 instance still around.
Class "vtkLookupTable" has 1 instance still around.
Class "vtkOpenGLActor" has 1 instance still around.
Class "vtkOpenGLProperty" has 1 instance still around.
Class "vtkInformationStringVectorValue" has 1 instance still around.
Class "vtkDataSetSurfaceFilter" has 1 instance still around.
Class "vtkInformationDoubleVectorValue" has 3 instances still around.
Class "vtkOpenGLUniforms" has 3 instances still around.
Class "vtkOpenGLShaderProperty" has 1 instance still around.
Class "vtkDataSetAttributes" has 1 instance still around.
Class "vtkAssemblyPath" has 1 instance still around.
Class "vtkAssemblyNode" has 1 instance still around.
Class "CellMap" has 1 instance still around.
Class "vtkAssemblyPaths" has 1 instance still around.
Class "vtkSelection" has 1 instance still around.
Class "vtkSelectionNode" has 1 instance still around.
Class "vtkInformationDoubleValue" has 1 instance still around.
Class "class vtkBuffer<int>" has 1 instance still around.
Class "vtkIntArray" has 1 instance still around.
Code to produce
selector = vtk.vtkOpenGLHardwareSelector()
selector.SetFieldAssociation(vtk.vtkDataObject.FIELD_ASSOCIATION_CELLS)
selector.SetRenderer(renderer_())
selector.SetArea(x0, y0, x1, y1)
selection = selector.Select()
Issue resolved with:
selection.UnRegister(selection)
Seems that when selection goes out of scope in Python it's not unregistered.