[vtkusers] Delete filter and its output
1danielcoelho
1danielcoelho at gmail.com
Wed Feb 18 06:08:45 EST 2015
Hello!
I have a sequence of many filters, all handling a lot of data. Let's say
FilterA -> FilterB ->Filter C.
I'm not using smart pointers, which means that each filter is instantiated
with:
Filter* FilterA = Filter::New();
If I watch the memory consumption of my program while it traverses the
filters, I can see that the outputs of every filter are kept in memory even
though they are no longer needed: For example: After FilterB runs, I have no
need for the output of FilterA anymore, but it still remains allocated. I'm
running out of RAM doing this, so I need to find a way to clear those
intermediary outputs.
The problem is that nothing actually frees this memory:
Filter->Delete(); does not immediately free the output memory
Filter->ReleaseData(); does not immediately free anything
Filter->GetOutput()->Delete; throws a SIGABRT (deleting things that are not
mine is usually a bad idea)
Using vtkSmartPointer and calling delete also appears to do nothing
Does anybody know of a way of doing this? Ideally, there would be a function
like Filter->ClearOutput(); that frees all allocated data for its output,
but I can't see anything like that.
Thanks!
--
View this message in context: http://vtk.1045678.n5.nabble.com/Delete-filter-and-its-output-tp5730424.html
Sent from the VTK - Users mailing list archive at Nabble.com.
More information about the vtkusers
mailing list