I found memory leak!!!

I find a problem and fixed it.
The code is below.
I think that you can find what is problem.
Please update it in the next version.
int vtkDataSetSurfaceFilter::UnstructuredGridExecute in vtkDataSetSurfaceFilter.cxx file.

int vtkDataSetSurfaceFilter::UnstructuredGridExecute(
  vtkDataSet* dataSetInput, vtkPolyData* output, vtkGeometryFilterHelper* info)
  vtkUnstructuredGrid* input = vtkUnstructuredGrid::SafeDownCast(dataSetInput);

  // If no info, then compute information about the unstructured grid.
  // Depending on the outcome, we may process the data ourselves, or send over
  // to the faster vtkGeometryFilter.
  bool mayDelegate = (info == nullptr && this->Delegation);
  if (info == nullptr)
    info = vtkGeometryFilterHelper::CharacterizeUnstructuredGrid(input);
  bool handleSubdivision = (!info->IsLinear);

  // Before we start doing anything interesting, check if we need handle
  // non-linear cells using sub-division.
  if (info->IsLinear && mayDelegate)
    vtkNew<vtkGeometryFilter> gf;
    vtkGeometryFilterHelper::CopyFilterParams(this, gf.Get());
    gf->UnstructuredGridExecute(dataSetInput, output, info, nullptr);
    delete info;
    return 1;

delete info;  // I added!!!!!!!!!!!!!!!

  // If here, the data is gnarly and this filter will process it.
  vtkSmartPointer<vtkCellIterator> cellIter =

  return this->UnstructuredGridExecuteInternal(input, output, handleSubdivision, cellIter);

Awesome ! Could you open a MR on our gitlab ?


It looks like the current master already has this memory leak fixed.

Thanks for checking @andreasbuykx !