summaryrefslogtreecommitdiff
path: root/tests/testcombo.c
diff options
context:
space:
mode:
authorPaolo Borelli <pborelli@katamail.com>2006-04-20 15:00:01 +0000
committerPaolo Borelli <pborelli@src.gnome.org>2006-04-20 15:00:01 +0000
commit3fc009ec443c08408df3adb686dbd5be1142921a (patch)
tree4a13205237b9cb553dcf65ca207f1e0d8c040bd3 /tests/testcombo.c
parent1787ca5e2a823357f0253902a7176eca3fd1e742 (diff)
downloadgtk+-3fc009ec443c08408df3adb686dbd5be1142921a.tar.gz
plug small leak (#339132) ditto
2006-04-20 Paolo Borelli <pborelli@katamail.com> * gtk/gtkcombobox.c: plug small leak (#339132) * tests/testcombo.c: ditto
Diffstat (limited to 'tests/testcombo.c')
-rw-r--r--tests/testcombo.c37
1 files changed, 28 insertions, 9 deletions
diff --git a/tests/testcombo.c b/tests/testcombo.c
index 32ee4d1cad..9f9f1641cf 100644
--- a/tests/testcombo.c
+++ b/tests/testcombo.c
@@ -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);