[evolution-patches] shell pixmap leak



pretty obvious.  the code should probably cache the pixmaps rather than
the pixbuf, or it should just use a pixmap api.

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
retrieving revision 1.1283
diff -u -3 -r1.1283 ChangeLog
--- ChangeLog	11 Jun 2003 04:18:11 -0000	1.1283
+++ ChangeLog	14 Jun 2003 02:24:41 -0000
@@ -1,3 +1,8 @@
+2003-06-14  Not Zed  <NotZed Ximian com>
+
+	* e-shell-folder-title-bar.c (e_shell_folder_title_bar_set_icon):
+	Free the created mask and pixmap after setting it to the icon.
+
 2003-06-05  Not Zed  <NotZed Ximian com>
 
 	** For #42691.
Index: e-shell-folder-title-bar.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-folder-title-bar.c,v
retrieving revision 1.50
diff -u -3 -r1.50 e-shell-folder-title-bar.c
--- e-shell-folder-title-bar.c	8 Apr 2003 20:44:58 -0000	1.50
+++ e-shell-folder-title-bar.c	14 Jun 2003 02:24:42 -0000
@@ -661,11 +661,16 @@
 		priv->icon = icon;
 	}
 
+	/* FIXME: This should definetly not be done every call */
 	gdk_pixbuf_render_pixmap_and_mask (priv->icon, &pixmap, &mask, 127);
 	gtk_image_set_from_pixmap (GTK_IMAGE (priv->title_button_icon), pixmap, mask);
+	g_object_unref(pixmap);
+	g_object_unref(mask);
 
 	gdk_pixbuf_render_pixmap_and_mask (priv->icon, &pixmap, &mask, 127);
 	gtk_image_set_from_pixmap (GTK_IMAGE (priv->title_icon), pixmap, mask);
+	g_object_unref(pixmap);
+	g_object_unref(mask);
 }
 
 


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