[PATCH] Re: Gtk2::Gdk::Pixbuf::render_pixmap_and_mask leaks X memory ?




On Apr 21, 2007, at 7:37 PM, squentin wrote:

It seems the render_pixmap_and_mask function from Gtk2::Gdk::Pixbuf is
leaking. Repetitive call to it cause the X server memory usage to grow.
Am I missing something ?

No, you're not. That appears to be a resource leak because of a reference leak in the bindings. gdk_pixbuf_render_pixmap_and_mask() and gdk_pixbuf_render_pixmap_and_mask_for_colormap() return brand-new GdkDrawables, but the bindings do not take ownership of the new objects. The GObjects leak, so the underlying X resources leak.

Please try the attached patch.

Attachment: render_pixmap_and_mask_leak.patch
Description: Binary data



--
I hate to break it to you, but magic data pixies don't exist.
  -- Simon Cozens




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