[vtkusers] Destroying objects from Python

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Wed Oct 2 11:07:00 EDT 2002

>>>>> "BC" == bryan cole <bryan.cole at teraview.co.uk> writes:


    Source-> Filter1->Filter2->Mapper

    BC> If I disconnect the pair of filters (for example) by resetting
    BC> the inputs and outputs of the mapper and source respectively,
    BC> to replace them with some other filters, how do I destroy the
    BC> redundant Filter1 and Filter2?

    BC> According to my understanding, using del Filter1 del Filter2
    BC> will simply remove the label for each filter (hence decreasing
    BC> their ref-counts by one). However Since the filters are still
    BC> connected to each other, they still have references >=1 so are
    BC> not destroyed. Thus I must break the connection between the
    BC> filters before they are destroyed.  How do I do this? Can I
    BC> set their inputs to NULL?

You can set the inputs to None which will be translated to NULL


More information about the vtkusers mailing list