[gtk+] Clear list of attached windows when disposing a widget
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Clear list of attached windows when disposing a widget
- Date: Thu, 2 May 2013 12:03:03 +0000 (UTC)
commit 117c86d08a6ba73c389bd68efe4c25ef5dea6cde
Author: Matthias Clasen <mclasen redhat com>
Date: Thu May 2 08:02:40 2013 -0400
Clear list of attached windows when disposing a widget
We were silently relying on everybody to detach their windows,
and would leak memory otherwise.
gtk/gtkwidget.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index b3f54c6..2136928 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -11052,6 +11052,9 @@ gtk_widget_dispose (GObject *object)
g_clear_object (&priv->muxer);
+ g_list_free (priv->attached_windows);
+ priv->attached_windows = NULL;
+
G_OBJECT_CLASS (gtk_widget_parent_class)->dispose (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]