The mitk::Surface::Graft(newSurface*) function has a memory leak:
The std::vector<vtkPolyData*> m_PolyDatas is cleared and afterward the polydatas of the new surface are filled into it.
However the new PolyDatas are created like this: vtkPolyData::New().
If there are already polydata inside of m_Polydatas, these objects will never be deleted.
Another issue is the mitkSurfaceToSurfaceFilter:
If you call SetNthInput(idx, obj) for all existing inputs a new output is generated, i.e. mitk::Surface::Graft is called.
In case of many inputs the memory leak / performance becomes critical.