[gtk/leak-fixes: 2/4] gtk-demo: Fix a memory leak
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/leak-fixes: 2/4] gtk-demo: Fix a memory leak
- Date: Fri, 7 Aug 2020 19:28:55 +0000 (UTC)
commit e0786a4a00139826c8d0a60de704252fa2bb877c
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Aug 7 15:15:18 2020 -0400
gtk-demo: Fix a memory leak
The colors demo was leaking a reference to its model.
This was showing up as crash when you manage to close
both the demo window and the main window while the
sorting is ongoing.
demos/gtk-demo/listview_colors.c | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/demos/gtk-demo/listview_colors.c b/demos/gtk-demo/listview_colors.c
index b63f2366e0..c8cf07cdba 100644
--- a/demos/gtk-demo/listview_colors.c
+++ b/demos/gtk-demo/listview_colors.c
@@ -1118,6 +1118,8 @@ do_listview_colors (GtkWidget *do_widget)
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), box);
g_object_bind_property (dropdown, "selected-item", gridview, "factory", G_BINDING_SYNC_CREATE);
+
+ g_object_unref (selection);
}
if (!gtk_widget_get_visible (window))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]