[vtkusers] vtkImageColorViewer
David Gobbi
david.gobbi at gmail.com
Sat Nov 28 18:13:26 EST 2009
Hi José,
Before calling "del" you should remove it from the pipeline. This is
done with any one of these three calls:
object.RemoveAllInputs(), if the object is a vtkAlgorithm
object.SetInputConnection(None), if the object is faking a vtkAlgorithm
object.SetInput(None), if the object still uses the old pipeline API
After that, the "del" should release the memory immediately. If it
doesn't, you can always force the garbage collection:
# force python garbage collection
import gc
gc.collect()
# force VTK garbage collection
import vtk
vtk.vtkGarbageCollector.Collect()
Forcing the garbage collector usually isn't necessary if you have
disconnected the object from the pipeline.
Cheers,
David
On Sat, Nov 28, 2009 at 3:50 PM, Lic. José M. Rodriguez Bacallao
<jmrbcu at gmail.com> wrote:
> hi folks, how do I release the memory occupied by an
> vtkImageColorViewer used from python?
> I think it is not properly garbage collected, even when I try remove
> it with "del"
>
> --
> Lic. José M. Rodriguez Bacallao
> Centro de Biofisica Medica
> -----------------------------------------------------------------
> Todos somos muy ignorantes, lo que ocurre es que no todos ignoramos lo mismo.
>
> Recuerda: El arca de Noe fue construida por aficionados, el titanic
> por profesionales
> -----------------------------------------------------------------
More information about the vtkusers
mailing list