From 3fc009ec443c08408df3adb686dbd5be1142921a Mon Sep 17 00:00:00 2001 From: Paolo Borelli Date: Thu, 20 Apr 2006 15:00:01 +0000 Subject: [PATCH] plug small leak (#339132) ditto 2006-04-20 Paolo Borelli * gtk/gtkcombobox.c: plug small leak (#339132) * tests/testcombo.c: ditto --- ChangeLog | 9 ++++++++- ChangeLog.pre-2-10 | 9 ++++++++- gtk/gtkcombobox.c | 2 ++ tests/testcombo.c | 37 ++++++++++++++++++++++++++++--------- 4 files changed, 46 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 93d34808b..44a141a62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,13 @@ +2006-04-20 Paolo Borelli + + * gtk/gtkcombobox.c: plug small leak (#339132) + * tests/testcombo.c: ditto + 2006-04-19 Michael Emmel - *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 * gtk/gtkfilechooserbutton.c: _GtkFileChooserButtonPrivate: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 93d34808b..44a141a62 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,6 +1,13 @@ +2006-04-20 Paolo Borelli + + * gtk/gtkcombobox.c: plug small leak (#339132) + * tests/testcombo.c: ditto + 2006-04-19 Michael Emmel - *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 * gtk/gtkfilechooserbutton.c: _GtkFileChooserButtonPrivate: diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index 4548720e7..eb730a5b8 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -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); } diff --git a/tests/testcombo.c b/tests/testcombo.c index 32ee4d1ca..9f9f1641c 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); -- 2.43.2