[gnome-calendar/wip/nielsdg/chainup-finalize] Don't forget to chain up to parent finalize



commit 8a60c266a6a0fc94d47c4fcbf36fafb369ed22fb
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Tue Oct 15 00:07:49 2019 +0200

    Don't forget to chain up to parent finalize
    
    This can give a small memory leak and can prevent the necessary closing
    of resources.

 src/core/gcal-manager.c      | 2 ++
 src/views/gcal-week-header.c | 2 ++
 2 files changed, 4 insertions(+)
---
diff --git a/src/core/gcal-manager.c b/src/core/gcal-manager.c
index afbdacbf..20921959 100644
--- a/src/core/gcal-manager.c
+++ b/src/core/gcal-manager.c
@@ -670,6 +670,8 @@ gcal_manager_finalize (GObject *object)
 
   g_clear_pointer (&self->clients, g_hash_table_destroy);
 
+  G_OBJECT_CLASS (gcal_manager_parent_class)->finalize (object);
+
   GCAL_EXIT;
 }
 
diff --git a/src/views/gcal-week-header.c b/src/views/gcal-week-header.c
index a0d0820f..e0f20c9f 100644
--- a/src/views/gcal-week-header.c
+++ b/src/views/gcal-week-header.c
@@ -1161,6 +1161,8 @@ gcal_week_header_finalize (GObject *object)
 
   for (i = 0; i < G_N_ELEMENTS (self->weather_infos); i++)
     wid_clear (&self->weather_infos[i]);
+
+  G_OBJECT_CLASS (gcal_week_header_parent_class)->finalize (object);
 }
 
 static void


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