On Tuesday 15 November 2005 21:06, you wrote:
> I'm doing a large number of calls to
> p = gtk.gdk.pixbuf_new_from_file(f)
> ...
> del p
> and am finding that the process consumes more and more memory as it
> goes on.  Should I expect the del to free up the memory used by the
> loaded image, or is there some kind of 'close' call I need to be
> invoking first?
Think I've found the answer to this one in the archives. Various other 
people have reported a similar bug, but 
http://article.gmane.org/gmane.comp.gnome.gtk+.python/2315/match=pixbuf
suggests it's an issue with the garbage collector. Adding an explicit 
gc.collect() after my del stops my memory usage wandering off the 
scale.  This looks like a generic issue for anyone manipulating lots 
of large objects, and an easy trap for those that thought that python 
'just did' memory allocation and one never need bother about it.
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to