Hi Sven,

On Wed, 2006-06-07 at 01:31 +0200, Sven de Marothy wrote:
> On Tue, 2006-06-06 at 17:40 +0200, Mark Wielaard wrote:
> > This fixes some memory leaks found by Norman when trying niffler with
> > the new Cairo code. With this I am able to run the slideshow without
> > running out of memory.
> 
> Looks good to me. I know I left some leaks here and there. So cleaning
> them up just means less work for me to do. Yay. :)

Good. But if you happen to have a list of things that need cleaning up
that would be appreciated. Hunting down memory leaks in the C code isn't
that fun to be honest.

I found another small one where we weren't unreffing a gdkpixbuf loader
which was holding onto the gdkpixbuf for us that we did unload. But we
were keeping the loader itself around. This fixes that:

2006-06-08  Mark Wielaard  <[EMAIL PROTECTED]>

    PR 27917
    * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c
    (Java_gnu_java_awt_peer_gtk_GtkImage_loadImageFromData): Ref pixbuf
    and unref loader.

Committed,

Mark

--- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c        30 May 2006 
11:30:02 -0000      1.23
+++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkImage.c        8 Jun 2006 
11:07:28 -0000
@@ -117,10 +117,14 @@

   if (pixbuf == NULL)
     {
+      g_object_unref (loader);
       createRawData (env, obj, NULL);
       return JNI_FALSE;
     }

+  g_object_ref (pixbuf);
+  g_object_unref (loader);
+
   width =  gdk_pixbuf_get_width (pixbuf);
   height = gdk_pixbuf_get_height (pixbuf);


Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to