[gtk/teardown-cleanup-2: 2/2] treeview: Break reference cycles on unrealize
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/teardown-cleanup-2: 2/2] treeview: Break reference cycles on unrealize
- Date: Mon, 11 May 2020 14:04:48 +0000 (UTC)
commit edc4bdab9b2f38fd508a0a3db4efcb3ce850a6f5
Author: Matthias Clasen <mclasen redhat com>
Date: Mon May 11 10:00:12 2020 -0400
treeview: Break reference cycles on unrealize
It is a bad idea to have such cycles in the first place,
and there is no need to let them linger past unrealize.
gtk/gtktreeview.c | 4 ++++
1 file changed, 4 insertions(+)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 9858400af6..f61cda3095 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -2307,6 +2307,10 @@ gtk_tree_view_unrealize (GtkWidget *widget)
tree_view->typeselect_flush_timeout = 0;
}
+ g_clear_pointer (&tree_view->scroll_to_path, gtk_tree_row_reference_free);
+ g_clear_pointer (&tree_view->drag_dest_row, gtk_tree_row_reference_free);
+ g_clear_pointer (&tree_view->top_row, gtk_tree_row_reference_free);
+
GTK_WIDGET_CLASS (gtk_tree_view_parent_class)->unrealize (widget);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]