mesh flaw occurs when using vtkBooleanOperation

Do you know how to remove both the inputs of port 0 and 1 in a vtkBooleanOperationPolyDataFIlter. I tried using RemoveAllInputs() but it only removed the data in port 0.