From 391c05ef70d1618c81aff8ce8ce40dc532fe311e Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 1 Sep 2020 12:56:51 -0400 Subject: [PATCH 1/3] inspector: Plug a small memory leak --- gtk/inspector/controllers.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gtk/inspector/controllers.c b/gtk/inspector/controllers.c index e5e90e663d..4f41ba3a56 100644 --- a/gtk/inspector/controllers.c +++ b/gtk/inspector/controllers.c @@ -265,6 +265,8 @@ gtk_inspector_controllers_dispose (GObject *object) gtk_widget_unparent (gtk_widget_get_first_child (GTK_WIDGET (self))); + g_clear_object (&self->sizegroup); + G_OBJECT_CLASS (gtk_inspector_controllers_parent_class)->dispose (object); } @@ -274,7 +276,7 @@ gtk_inspector_controllers_class_init (GtkInspectorControllersClass *klass) GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS (klass); - object_class->dispose= gtk_inspector_controllers_dispose; + object_class->dispose = gtk_inspector_controllers_dispose; gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT); } From aaef9bec7f2a63f0a1238c3a17d040012f414497 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 1 Sep 2020 13:01:34 -0400 Subject: [PATCH 2/3] treelistrowsorter: Plug a memory leak --- gtk/gtktreelistrowsorter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtktreelistrowsorter.c b/gtk/gtktreelistrowsorter.c index c4f63c1280..a35996e9ac 100644 --- a/gtk/gtktreelistrowsorter.c +++ b/gtk/gtktreelistrowsorter.c @@ -354,7 +354,7 @@ gtk_tree_list_row_sort_keys_new (GtkTreeListRowSorter *self) sizeof (gpointer[MAX_KEY_DEPTH])); if (self->sorter) - result->sort_keys = gtk_sort_keys_ref (gtk_sorter_get_keys (self->sorter)); + result->sort_keys = gtk_sorter_get_keys (self->sorter); result->cached_keys = g_hash_table_new (NULL, NULL); return (GtkSortKeys *) result; From 0e6eba3968676ad6b9d76ee2403406ad6fedf9ac Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 1 Sep 2020 13:06:20 -0400 Subject: [PATCH 3/3] inspector: Plug another memory leak Fixes: #3107 --- gtk/inspector/gtktreemodelcssnode.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gtk/inspector/gtktreemodelcssnode.c b/gtk/inspector/gtktreemodelcssnode.c index e6d87dc985..2939e438cf 100644 --- a/gtk/inspector/gtktreemodelcssnode.c +++ b/gtk/inspector/gtktreemodelcssnode.c @@ -345,6 +345,8 @@ gtk_tree_model_css_node_finalize (GObject *object) priv->root = NULL; } + g_free (priv->column_types); + G_OBJECT_CLASS (gtk_tree_model_css_node_parent_class)->finalize (object); }