Does shallow copy increase the lifetime of an object?

Hello!

Let s say, I have a filter which is called in a function and is desctructed then the function returns.

The function also shallow-copies the filter output to the object of the caller scope.

The question is, whether the filter output data could actually be invalidated when the filter object is destroyed?

Thanks!

Yes, the output object of the folder will be deleted when the filter is deleted if no other object references it. A copy operation does not increase the reference count of the source object.