[libhandy/tabs: 5/62] Plug a leak




commit e188aa0828da4c7b02a9886429069558b4af111c
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Thu Sep 3 20:51:35 2020 +0500

    Plug a leak

 src/hdy-tab-view.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
---
diff --git a/src/hdy-tab-view.c b/src/hdy-tab-view.c
index f90cc1e3..34ba182e 100644
--- a/src/hdy-tab-view.c
+++ b/src/hdy-tab-view.c
@@ -695,6 +695,17 @@ hdy_tab_view_dispose (GObject *object)
   G_OBJECT_CLASS (hdy_tab_view_parent_class)->dispose (object);
 }
 
+static void
+hdy_tab_view_finalize (GObject *object)
+{
+  HdyTabView *self = (HdyTabView *) object;
+
+  g_clear_object (&self->default_icon);
+  g_clear_object (&self->menu_model);
+
+  G_OBJECT_CLASS (hdy_tab_view_parent_class)->finalize (object);
+}
+
 static void
 hdy_tab_view_get_property (GObject    *object,
                            guint       prop_id,
@@ -771,6 +782,7 @@ hdy_tab_view_class_init (HdyTabViewClass *klass)
   GtkBindingSet *binding_set;
 
   object_class->dispose = hdy_tab_view_dispose;
+  object_class->finalize = hdy_tab_view_finalize;
   object_class->get_property = hdy_tab_view_get_property;
   object_class->set_property = hdy_tab_view_set_property;
 
@@ -2528,4 +2540,3 @@ hdy_tab_view_get_pages (HdyTabView *self)
 
   return G_LIST_MODEL (self->pages);
 }
-


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]