[gnome-control-center/wip/benzea/display-settings-widget: 5/18] display: Add missing finalize handler for CcDisplayMonitor
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/wip/benzea/display-settings-widget: 5/18] display: Add missing finalize handler for CcDisplayMonitor
- Date: Tue, 29 Jan 2019 10:51:58 +0000 (UTC)
commit d5d8a5e31f3f48045c543d76f98feb7f2828fdd7
Author: Benjamin Berg <bberg redhat com>
Date: Sun Jan 20 21:42:04 2019 +0100
display: Add missing finalize handler for CcDisplayMonitor
This caused the UI related strings to be leaked.
panels/display/cc-display-config.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
---
diff --git a/panels/display/cc-display-config.c b/panels/display/cc-display-config.c
index e2b6d991c..626f3f5f4 100644
--- a/panels/display/cc-display-config.c
+++ b/panels/display/cc-display-config.c
@@ -150,9 +150,25 @@ cc_display_monitor_init (CcDisplayMonitor *self)
priv->is_usable = TRUE;
}
+static void
+cc_display_monitor_finalize (GObject *object)
+{
+ CcDisplayMonitor *self = CC_DISPLAY_MONITOR (object);
+ CcDisplayMonitorPrivate *priv = CC_DISPLAY_MONITOR_GET_PRIVATE (self);
+
+ g_clear_pointer (&priv->ui_name, g_free);
+ g_clear_pointer (&priv->ui_number_name, g_free);
+
+ G_OBJECT_CLASS (cc_display_monitor_parent_class)->finalize (object);
+}
+
static void
cc_display_monitor_class_init (CcDisplayMonitorClass *klass)
{
+ GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
+
+ gobject_class->finalize = cc_display_monitor_finalize;
+
g_signal_new ("rotation",
CC_TYPE_DISPLAY_MONITOR,
G_SIGNAL_RUN_LAST,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]