summaryrefslogtreecommitdiff
path: root/tests/testcombo.c
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2004-07-22 02:19:19 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-07-22 02:19:19 +0000
commitf0505514b2caecf0f64bdd668e0ce4949db01bb3 (patch)
treee8ce8fdd5349a92a7e55162a121f6567db37032e /tests/testcombo.c
parent7f3499c3a71bb90990239dc1d88ad7a67729cc2b (diff)
downloadgtk+-f0505514b2caecf0f64bdd668e0ce4949db01bb3.tar.gz
Don't leak models. (#148128, Tommi Komulainen)
Wed Jul 21 22:17:06 2004 Matthias Clasen <maclas@gmx.de> * tests/testcombo.c (main): Don't leak models. (#148128, Tommi Komulainen)
Diffstat (limited to 'tests/testcombo.c')
-rw-r--r--tests/testcombo.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/testcombo.c b/tests/testcombo.c
index 7f9f46697c..fd8555485a 100644
--- a/tests/testcombo.c
+++ b/tests/testcombo.c
@@ -110,6 +110,8 @@ create_combo_box_grid_demo ()
0, create_color_pixbuf ("magenta"),
-1);
+ g_object_unref (store);
+
gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
return combo;
@@ -229,13 +231,14 @@ main (int argc, char **argv)
GtkWidget *tmp, *boom;
GtkCellRenderer *renderer;
GdkPixbuf *pixbuf;
+ GtkTreeModel *model;
GValue value = {0, };
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_container_set_border_width (GTK_CONTAINER (window), 5);
- g_signal_connect (window, "delete_event", gtk_main_quit, NULL);
+ g_signal_connect (window, "destroy", gtk_main_quit, NULL);
mainbox = gtk_vbox_new (FALSE, 2);
gtk_container_add (GTK_CONTAINER (window), mainbox);
@@ -287,7 +290,9 @@ main (int argc, char **argv)
gtk_container_set_border_width (GTK_CONTAINER (boom), 5);
gtk_container_add (GTK_CONTAINER (tmp), boom);
- combobox = gtk_combo_box_new_with_model (create_blaat ());
+ model = create_blaat ();
+ combobox = gtk_combo_box_new_with_model (model);
+ g_object_unref (model);
gtk_container_add (GTK_CONTAINER (boom), combobox);
renderer = gtk_cell_renderer_pixbuf_new ();