[Paraview-developers] how do I force garbage collection?

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Fri Feb 22 15:27:36 EST 2013


Josh,

VTK/ParaView uses reference counting. So as long as a there's a reference
held to any dataobject, Delete() is not going to release it. Barring
cycles, a quick way to see if Delete() will result in clearing the object,
is to look it it's ReferenceCount member variable before calling Delete().
However if you're passing the data allocated as output from your filters
then the reference maybe getting held by the pipeline beyond your control.
If you can share the code, I can see if I can explain why the memory may
not be getting released.

Utkarsh


On Fri, Feb 22, 2013 at 12:22 PM, Joshua Murphy <
Joshua.Murphy at lasp.colorado.edu> wrote:

> Hello,
>
> I am writing a cache system for my reader, and I am trying to figure out
> how to force a garbage collection after I dump my cache.
>
> Does anyone know how to force ParaView to collect garbage?  Currently
> after I purge my cache (I am calling Delete() on all of the objects and
> destroying the remainder of the cache map) the system memory does not free
> up… ParaView remains in control of all of the memory for the dumped cache
> items, and when the new cache is introduced, the memory usage just keeps
> going up.
>
> I suppose it is possible that I am missing some fundamental understanding
> of how ParaView and VTK manage memory, so if someone could help that would
> be great.
>
>
> Thanks,
>
> Josh
>
> Joshua J. Murphy
> Computer Scientist
> Laboratory for Atmospheric and Space Physics
> University of Colorado, Boulder
>
>
> _______________________________________________
> Paraview-developers mailing list
> Paraview-developers at paraview.org
> http://public.kitware.com/mailman/listinfo/paraview-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20130222/6c7ff8be/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 16467 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20130222/6c7ff8be/attachment.png>


More information about the Paraview-developers mailing list