summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMatthias Clasen <maclas@gmx.de>2004-07-22 02:26:07 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-07-22 02:26:07 +0000
commiteaadb3ad62ea4c2772b8ce1bfa85a09e5905a1bb (patch)
tree4584a88344df26e72a8a8b1197091b250f83956c /gtk
parentf0505514b2caecf0f64bdd668e0ce4949db01bb3 (diff)
downloadgtk+-eaadb3ad62ea4c2772b8ce1bfa85a09e5905a1bb.tar.gz
Don't leak tree model and tree row reference. (#148125, Crispin Flowerday)
Wed Jul 21 22:24:10 2004 Matthias Clasen <maclas@gmx.de> * gtk/gtkcellview.c (gtk_cell_view_finalize): Don't leak tree model and tree row reference. (#148125, Crispin Flowerday)
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkcellview.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gtk/gtkcellview.c b/gtk/gtkcellview.c
index 14600a29c1..2771c893e6 100644
--- a/gtk/gtkcellview.c
+++ b/gtk/gtkcellview.c
@@ -293,7 +293,15 @@ gtk_cell_view_style_set (GtkWidget *widget,
static void
gtk_cell_view_finalize (GObject *object)
{
- gtk_cell_view_cell_layout_clear (GTK_CELL_LAYOUT (object));
+ GtkCellView *cellview = GTK_CELL_VIEW (object);
+
+ gtk_cell_view_cell_layout_clear (GTK_CELL_LAYOUT (cellview));
+
+ if (cellview->priv->model)
+ g_object_unref (cellview->priv->model);
+
+ if (cellview->priv->displayed_row)
+ gtk_tree_row_reference_free (cellview->priv->displayed_row);
if (G_OBJECT_CLASS (parent_class)->finalize)
(* G_OBJECT_CLASS (parent_class)->finalize) (object);