gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet-gtk4] branch master updated: statistics: Destroy statistics obje


From: gnunet
Subject: [gnunet-gtk4] branch master updated: statistics: Destroy statistics object on application quit.
Date: Tue, 02 Jul 2024 07:28:39 +0200

This is an automated email from the git hooks/post-receive script.

gautham_x pushed a commit to branch master
in repository gnunet-gtk4.

The following commit(s) were added to refs/heads/master by this push:
     new 393955f  statistics: Destroy statistics object on application quit.
393955f is described below

commit 393955fb41d12214121cbaf753a59d3ffe8e780a
Author: Gotam Gorabh <gautamy672@gmail.com>
AuthorDate: Tue Jul 2 10:58:09 2024 +0530

    statistics: Destroy statistics object on application quit.
---
 src/statistics/gnunet-statistics-window.c | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/statistics/gnunet-statistics-window.c 
b/src/statistics/gnunet-statistics-window.c
index 1555943..f8df4a0 100644
--- a/src/statistics/gnunet-statistics-window.c
+++ b/src/statistics/gnunet-statistics-window.c
@@ -56,9 +56,6 @@ struct _GnunetStatisticsWindow
   /* When did this process start? */
   struct GNUNET_TIME_Absolute start_time;
 
-  /* Name of the configuration file.*/
-  char *cfgfile;
-
   char *baseconfig;
   char *ipath2;
   char *ipath;
@@ -182,11 +179,25 @@ create_plot (GnunetStatisticsWindow *self, GtkWidget 
*widget, const struct PlotI
 
 }
 
+static void
+gnunet_statistics_window_finalize (GObject *object)
+{
+  GnunetStatisticsWindow *self = GNUNET_STATISTICS_WINDOW (object);
+
+  GNUNET_STATISTICS_destroy (self->statistics, GNUNET_NO);
+  self->statistics = NULL;
+
+  G_OBJECT_CLASS (gnunet_statistics_window_parent_class)->finalize (object);
+}
+
 static void
 gnunet_statistics_window_class_init (GnunetStatisticsWindowClass *klass)
 {
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
   GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
 
+  object_class->finalize = gnunet_statistics_window_finalize;
+
   gtk_widget_class_set_template_from_resource (widget_class,
                              
"/org/gnu/gnunet-gtk/gnunet-statistics-window.ui");
   gtk_widget_class_bind_template_child (widget_class, GnunetStatisticsWindow,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]