Re: [Paraview] Question about data (memory) management

2017-02-02 Thread Cornelis Bockemühl
Thanks for confirming what I assumed but was not able to fully verify myself! With that first smart pointer I would not have "dared" to go because I would now know whether the output data is already managed by some smart pointer inside the filter. Meaning that the memory would be released once the

Re: [Paraview] Question about data (memory) management

2017-02-02 Thread Utkarsh Ayachit
In general (unless I missed something), it looks fine. A couple of notes: 1. You don't need to even shallow copy, you can simply save the output from any of the internal filters (I typically use a vtkSmartPointer to hold on to the reference). e.g. vtkSmartPointer intermediaResult = filt1->GetOu

[Paraview] Question about data (memory) management

2017-02-02 Thread Cornelis Bockemühl
Dear all, Would the following construct be safe in terms of proper data handling inside a filter or would I generate some "unpredictable results", like data being copied over other data that is still being used? My purpose is of course to copy data only if it is absolutely required. And I assume