plug small leak (#339132) ditto

2006-04-20  Paolo Borelli  <pborelli@katamail.com>

	* gtk/gtkcombobox.c: plug small leak (#339132)
	* tests/testcombo.c: ditto
This commit is contained in:
Paolo Borelli 2006-04-20 15:00:01 +00:00 committed by Paolo Borelli
parent 1787ca5e2a
commit 3fc009ec44
4 changed files with 46 additions and 11 deletions

View File

@ -1,6 +1,13 @@
2006-04-20 Paolo Borelli <pborelli@katamail.com>
* gtk/gtkcombobox.c: plug small leak (#339132)
* tests/testcombo.c: ditto
2006-04-19 Michael Emmel <mike.emmel@gmail.com>
*gdk/directfb/gdkdrawable-directfb.c fixed off by one error in
* gdk/directfb/gdkdrawable-directfb.c: fixed off by one error in
clip patch from (#330824)
2006-04-19 Murray Cumming <murrayc@murrayc.com>
* gtk/gtkfilechooserbutton.c: _GtkFileChooserButtonPrivate:

View File

@ -1,6 +1,13 @@
2006-04-20 Paolo Borelli <pborelli@katamail.com>
* gtk/gtkcombobox.c: plug small leak (#339132)
* tests/testcombo.c: ditto
2006-04-19 Michael Emmel <mike.emmel@gmail.com>
*gdk/directfb/gdkdrawable-directfb.c fixed off by one error in
* gdk/directfb/gdkdrawable-directfb.c: fixed off by one error in
clip patch from (#330824)
2006-04-19 Murray Cumming <murrayc@murrayc.com>
* gtk/gtkfilechooserbutton.c: _GtkFileChooserButtonPrivate:

View File

@ -5000,6 +5000,8 @@ gtk_combo_box_finalize (GObject *object)
}
g_slist_free (combo_box->priv->cells);
g_free (combo_box->priv->tearoff_title);
G_OBJECT_CLASS (parent_class)->finalize (object);
}

View File

@ -66,6 +66,7 @@ create_combo_box_grid_demo (void)
{
GtkWidget *combo;
GtkTreeIter iter;
GdkPixbuf *pixbuf;
GtkCellRenderer *cell = gtk_cell_renderer_pixbuf_new ();
GtkListStore *store;
@ -80,52 +81,70 @@ create_combo_box_grid_demo (void)
3);
/* first row */
pixbuf = create_color_pixbuf ("red");
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
0, create_color_pixbuf ("red"),
0, pixbuf,
-1);
g_object_unref (pixbuf);
pixbuf = create_color_pixbuf ("green");
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
0, create_color_pixbuf ("green"),
0, pixbuf,
-1);
g_object_unref (pixbuf);
pixbuf = create_color_pixbuf ("blue");
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
0, create_color_pixbuf ("blue"),
0, pixbuf,
-1);
g_object_unref (pixbuf);
/* second row */
pixbuf = create_color_pixbuf ("yellow");
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
0, create_color_pixbuf ("yellow"),
0, pixbuf,
-1);
g_object_unref (pixbuf);
pixbuf = create_color_pixbuf ("black");
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
0, create_color_pixbuf ("black"),
0, pixbuf,
-1);
g_object_unref (pixbuf);
pixbuf = create_color_pixbuf ("white");
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
0, create_color_pixbuf ("white"),
0, pixbuf,
-1);
g_object_unref (pixbuf);
/* third row */
pixbuf = create_color_pixbuf ("gray");
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
0, create_color_pixbuf ("gray"),
0, pixbuf,
-1);
g_object_unref (pixbuf);
pixbuf = create_color_pixbuf ("snow");
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
0, create_color_pixbuf ("snow"),
0, pixbuf,
-1);
g_object_unref (pixbuf);
pixbuf = create_color_pixbuf ("magenta");
gtk_list_store_append (store, &iter);
gtk_list_store_set (store, &iter,
0, create_color_pixbuf ("magenta"),
0, pixbuf,
-1);
g_object_unref (pixbuf);
g_object_unref (store);