[nautilus/gnome-3-6] query-editor: plug a leak
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-3-6] query-editor: plug a leak
- Date: Mon, 12 Nov 2012 21:25:01 +0000 (UTC)
commit b74ae85ffe962ef5754e528e10656a930ad8bcbc
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Nov 12 15:53:41 2012 -0500
query-editor: plug a leak
We weren't freeing the row list and all the row structs.
src/nautilus-query-editor.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/src/nautilus-query-editor.c b/src/nautilus-query-editor.c
index e356374..f89cb68 100644
--- a/src/nautilus-query-editor.c
+++ b/src/nautilus-query-editor.c
@@ -238,6 +238,13 @@ nautilus_query_editor_handle_event (NautilusQueryEditor *editor,
}
static void
+row_destroy (NautilusQueryEditorRow *row)
+{
+ gtk_widget_destroy (row->toolbar);
+ g_free (row);
+}
+
+static void
nautilus_query_editor_dispose (GObject *object)
{
NautilusQueryEditor *editor;
@@ -251,6 +258,9 @@ nautilus_query_editor_dispose (GObject *object)
g_clear_object (&editor->details->query);
+ g_list_free_full (editor->details->rows, (GDestroyNotify) row_destroy);
+ editor->details->rows = NULL;
+
G_OBJECT_CLASS (nautilus_query_editor_parent_class)->dispose (object);
}
@@ -856,13 +866,6 @@ get_next_free_type (NautilusQueryEditor *editor)
}
static void
-row_destroy (NautilusQueryEditorRow *row)
-{
- gtk_widget_destroy (row->toolbar);
- g_free (row);
-}
-
-static void
remove_row_cb (GtkButton *clicked_button, NautilusQueryEditorRow *row)
{
NautilusQueryEditor *editor;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]