[gnome-control-center/wip/benzea/display-settings-widget: 13/26] 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: 13/26] display: Add missing finalize handler for CcDisplayMonitor
- Date: Tue, 29 Jan 2019 10:47:39 +0000 (UTC)
commit e8cb39cf3364f547e7f756e004d80a728bb95978
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]