Tom Holroyd (NIH/NIMH) [E] wrote:
>> import os,matplotlib
>> matplotlib.use('Agg')
>> from matplotlib.figure import Figure
>> from matplotlib.cbook import report_memory
>>
>> def plot():
>>     fig = Figure()
>>     i = 0
>>     while True:
>>         print report_memory(i)
>>         fig.clf()
>>         ax = fig.add_axes([0.1,0.1,0.7,0.7])
>>         ax.plot([1,2,3])
>>         i += 1
>>
>> if __name__ == '__main__': plot()
>
> I have matplotlib-0.90.0 installed, and this script doesn't leak for 
> me. It grows a bit as shown in the graph, then stabilizes. I'm on FC4 
> with Python 2.4.3.
>
> ------------------------------------------------------------------------
>


Right - here too (on macos x), it levels off about about 15 times the 
initial memory usage.  I just didn't run it long enough to notice that 
before.

-Jeff

-- 
Jeffrey S. Whitaker         Phone  : (303)497-6313
Meteorologist               FAX    : (303)497-6449
NOAA/OAR/PSD  R/PSD1        Email  : [EMAIL PROTECTED]
325 Broadway                Office : Skaggs Research Cntr 1D-124
Boulder, CO, USA 80303-3328 Web    : http://tinyurl.com/5telg


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to