Ryan May <rmay31@...287...> writes:
If you're using the full OO interface and creating a figure by making an
instance of Figure(), then you shouldn't need to close the figure by hand.
It should be deleted whenever you delete or replace your instance of
Figure. (If I understand correctly.)
Yes, in the OO interface there is no close() because matplotlib does not
retain any references to the figure object. Garbage collection will take
care of reclaiming memory once the user code has no more references to
the object either.
That said, there have been cases of memory leaks caused by circular
references among objects that have __del__ methods. I think all known
leaks have been fixed, but if I were deploying a long-lived application
that creates lots of figures, I would definitely want to watch its
memory usage in my exact use case.
···
On Mon, Feb 9, 2009 at 2:37 PM, A B <python6009@...287...> wrote:
--
Jouni K. Sepp�nen