[gtk+] Free some missing fields in ::finalize()
- From: Benjamin Otte <otte src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtk+] Free some missing fields in ::finalize()
- Date: Thu, 15 Oct 2009 20:41:15 +0000 (UTC)
commit 112d2430bee7dcecc274b2d61bfc63e5b851b773
Author: Federico Mena Quintero <federico novell com>
Date: Fri Sep 4 13:42:46 2009 -0500
Free some missing fields in ::finalize()
Signed-off-by: Federico Mena Quintero <federico novell com>
gtk/gtkfilesystemmodel.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkfilesystemmodel.c b/gtk/gtkfilesystemmodel.c
index 0e8345f..97027d2 100644
--- a/gtk/gtkfilesystemmodel.c
+++ b/gtk/gtkfilesystemmodel.c
@@ -978,11 +978,17 @@ gtk_file_system_model_finalize (GObject *object)
for (i = 0; i < model->files->len; i++)
{
+ int v;
+
FileModelNode *node = get_node (model, i);
if (node->file)
g_object_unref (node->file);
if (node->info)
g_object_unref (node->info);
+
+ for (v = 0; v < model->column_types; v++)
+ if (G_VALUE_TYPE (node->values[v]) != G_TYPE_INVALID)
+ g_value_unset (&node->values[v]);
}
g_array_free (model->files, TRUE);
@@ -996,6 +1002,8 @@ gtk_file_system_model_finalize (GObject *object)
if (model->filter)
g_object_unref (model->filter);
+ g_slice_free1 (sizeof (GType) * n_columns, model->column_types);
+
_gtk_tree_data_list_header_free (model->sort_list);
if (model->default_sort_destroy)
model->default_sort_destroy (model->default_sort_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]