[vtkusers] Delete vtkPolyData from vtkAlgorithmOutput (VTK 5.10.1)

John Platt jcplatt at dsl.pipex.com
Fri Feb 20 11:33:16 EST 2015


Hi All,

(a) Trying to delete vtkPolyData using ...

          vtkPolyData* myPD = vtkPolyData::New() ;
          vtkAlgorithmOutput* algOut = myPD->GetProducerPort();
          vtkAlgorithm* alg = algOut->GetProducer();
          alg->Delete();

asserts with "e->Component->Net Count > 0"

(b) If I do the same with vtkArcSource ...

          vtkArcSource* myArc  = vtkArcSource::New();
          vtkAlgorithmOutput* algOut = myArc->GetOutputPort( 0 );
          vtkAlgorithm* alg = algOut->GetProducer();
          alg->Delete();

OK.

The problem arises because where the objects are being deleted, only 
vtkAlgorithmOutput* algOut is available and it would be nice to use the 
same code regardless of what produced the output.

Any ideas?

Thanks,

John.





More information about the vtkusers mailing list