Hi, I understand there is a need to call Delete on the object but I don't understand why it is called before the line that uses the object that has just been deleted. I.e. why isn't it:
this->GetOutputPortInformation(0)->Set( vtkDataObject::DATA_EXTENT_TYPE(), *newOutput->GetExtentType()*); *newOutput->Delete();* * * instead of: *newOutput->Delete();* this->GetOutputPortInformation(0)->Set( vtkDataObject::DATA_EXTENT_TYPE(), *newOutput->GetExtentType()*); Am I missing something here? Thanks,Paul 2009/8/25 Jeff Baumes <[email protected]> > > On Tue, Aug 25, 2009 at 8:43 AM, Paul Edwards <[email protected]>wrote: > >> Is there a reason why Delete is called before GetExtentType? Or is this a >> bug? (although it doesn't crash on me....) >> > > SetPipelineInformation will cause the information object to increment the > reference count of the data object. Thus calling Delete will safely > decrement the reference count without yet releasing the memory (this matches > the reference created by NewInstance()). This is necessary or else a > reference will be floating and the object will never be deleted. > Jeff > >
_______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the ParaView Wiki at: http://paraview.org/Wiki/ParaView Follow this link to subscribe/unsubscribe: http://www.paraview.org/mailman/listinfo/paraview
