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.
--
Tom Holroyd, Ph.D.
We experience the world not as it is, but as we expect it to be.

PNG image

-------------------------------------------------------------------------
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