Gdk::Pixbuf memory leak



hi,

This problem has being spot for more than a year, in versions
like 0.7006.

If you create a Gdk::Pixmap from a Gdk::Pixbuf, specially
using the render_pixmap_and_mask() call, the pixmap will never
get unreferenced when out of scope and thus the X11 memory 
will never get free (unless you kill the app).

Most people will not note this unless you create tons of 
Gdk::Pixmaps. The simpton is that the X11 server seems to 
leak memory.

I attatched a patch that solve this problem and by talking to 
other gtk+ developers (in #gtk+) this is the right way to do it.
It should work with CVS version and 0.7008.

I have only dealt with gdk_pixbuf_render_pixmap_and_mask(), the 
render_pixmap_and_mask() method.
If other functions from Gdk::Pixbuf is used to create
Gdk::Pixmaps, it is possible that the leak still there.


Attachment: perl-gtk-perl-gdkpixmap_pixbuf_ref_counf.patch
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]