[gtk+] Plug some memory leaks
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Plug some memory leaks
- Date: Thu, 28 Sep 2017 17:58:47 +0000 (UTC)
commit 29a4f0ce1f7722017f5993a64e2e4a5687d2d4ea
Author: Timm Bäder <mail baedert org>
Date: Thu Sep 28 20:00:24 2017 +0200
Plug some memory leaks
Make sure the scroll controllers in GtkComboBox and GtkScrolledWindow
get destroyed.
gtk/gtkcombobox.c | 2 ++
gtk/gtkscrolledwindow.c | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index dced3d7..633099d 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -2803,6 +2803,8 @@ gtk_combo_box_dispose (GObject* object)
GtkComboBox *combo_box = GTK_COMBO_BOX (object);
GtkComboBoxPrivate *priv = combo_box->priv;
+ g_clear_object (&priv->scroll_controller);
+
if (priv->popup_widget)
{
/* Stop menu destruction triggering toggle on a now-invalid button */
diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c
index 52fbd20..9d89da1 100644
--- a/gtk/gtkscrolledwindow.c
+++ b/gtk/gtkscrolledwindow.c
@@ -2642,6 +2642,8 @@ gtk_scrolled_window_finalize (GObject *object)
g_clear_object (&priv->swipe_gesture);
g_clear_object (&priv->long_press_gesture);
g_clear_object (&priv->pan_gesture);
+ g_clear_object (&priv->scroll_controller);
+
G_OBJECT_CLASS (gtk_scrolled_window_parent_class)->finalize (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]