Hello to all, This is yet another question about matplotlib not freeing memory, when closing a figure (using close()). Here is what I'm doing (tried with several backends, on MacOSX and Linux, with similar results): -------------------- import matplotlib as mpl from matplotlib import pylot as plt import numpy as np
a = np.arange(1000000) mpl.cbook.report_memory() # -> output: 54256 plt.plot(a) mpl.cbook.report_memory() # -> output: 139968 plt.close() mpl.cbook.report_memory() # -> output: 138748 -------------------- Shouldn't plt.close() close the figure _and_ free the memory used by it? What am I doing wrong ? I tried several other ways to free the memory, such as f = figure(); ... ; del f, without luck. Any help appreciated ! P.S. : side question : how come the call to plot take so much memory (90MB for a 8MB array ?). I have read somewhere that each point is coded on three RGB floats, but it only means an approx. 12MB plot... (plus small overhead) Jules ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users