GtkColorSel leaks



more leaks....

/ alex

Index: gtk/gtkcolorsel.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkcolorsel.c,v
retrieving revision 1.60
diff -u -p -r1.60 gtkcolorsel.c
--- gtk/gtkcolorsel.c	2000/12/13 01:34:39	1.60
+++ gtk/gtkcolorsel.c	2001/01/23 14:41:29
@@ -879,6 +879,7 @@ grab_color_at_mouse (GtkWidget *button,
   
   image = gdk_image_get (GDK_ROOT_PARENT (), x_root, y_root, 1, 1);
   pixel = gdk_image_get_pixel (image, 0, 0);
+  gdk_image_unref (image);
   visual = gdk_colormap_get_visual (colormap);
   
   switch (visual->type) {
@@ -919,6 +920,7 @@ grab_color_at_mouse (GtkWidget *button,
 		  &priv->color[COLORSEL_HUE],
 		  &priv->color[COLORSEL_SATURATION],
 		  &priv->color[COLORSEL_VALUE]);
+
   update_color (colorsel);
 }
 
@@ -1397,6 +1399,9 @@ gtk_color_selection_init (GtkColorSelect
   gtk_signal_connect (GTK_OBJECT (button), "clicked", get_screen_color, NULL);
   dropper_pixmap = gdk_pixmap_colormap_create_from_xpm_d (NULL, gtk_widget_get_colormap (button), &mask, NULL, picker);
   dropper_image = gtk_pixmap_new (dropper_pixmap, mask);
+  gdk_pixmap_unref (dropper_pixmap);
+  if (mask)
+    gdk_pixmap_unref (mask);
   gtk_container_add (GTK_CONTAINER (button), dropper_image);
   gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
   





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