Hi, Big, Fat Piggy Gimp Fans,

here's a very small patch that should fix our huge leak:

Index: app/gimpimage.c
===================================================================
RCS file: /cvs/gnome/gimp/app/Attic/gimpimage.c,v
retrieving revision 1.121.2.1
diff -u -r1.121.2.1 gimpimage.c
--- app/gimpimage.c     2000/12/27 17:55:19     1.121.2.1
+++ app/gimpimage.c     2001/06/12 00:00:57
@@ -1456,7 +1456,7 @@
   for (list = gimage->layers; list; list = g_slist_next (list))
     {
       layer = (Layer *) list->data;
-      layer_delete (layer);
+      layer_unref (layer);
     }
   g_slist_free (gimage->layers);
   g_slist_free (gimage->layer_stack);
@@ -1472,7 +1472,7 @@
   for (list = gimage->channels; list; list = g_slist_next (list))
     {
       channel = (Channel *) list->data;
-      channel_delete (channel);
+      channel_unref (channel);
     }
   g_slist_free (gimage->channels);
 }


Given the confusing API used here it's not surprising that this could happen. 
Gimp HEAD already had this hole plugged, but not because someone found and 
fixed it, but because the code has already become much cleaner and we avoid 
to wrap around basic functions like gtk_object_[ref|unref].

I don't consider this a clean solution but since it's a very small change,
we should be able to evaluate easily if it is a correct fix. A better fix 
can be found in CVS HEAD, but I would prefer not to do too much changes to 
1.2 if it can be avoided.

I haven't tested the patch much so far, so please torture it.


Salut, Sven
_______________________________________________
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer

Reply via email to