Question about pylab.figure

Hi everybody,

when repeating the following sequence:

pylab.figure()

pylab.close()

the memory used increases like if something remained. Would you have any idea of what is going on ? How to solve this kind of memory leak ?

thank you very much

Eruc

···

D�couvrez une nouvelle fa�on d’obtenir des r�ponses � toutes vos questions ! Profitez des connaissances, des opinions et des exp�riences des internautes sur Yahoo! Questions/R�ponses.

Pellegrini Eric wrote:

Hi everybody,
when repeating the following sequence:
pylab.figure()
pylab.close()
the memory used increases like if something remained. Would you have any idea of what is going on ? How to solve this kind of memory leak ?

I have confirmed this with svn on linux (default backend, GtkAgg) using the attached script. We are losing about 17k per loop. The usual memory leak checker still indicates that things are OK. The difference appears to be the backend. The attached script with Agg instead of GtkAgg is OK; but with TkAgg it also leaks. It looks like there is something in the interactive backend setup that is not getting cleaned up by close().

Thanks for pointing it out.

Eric

mem_minimal.py (747 Bytes)