Free some missing fields in ::finalize()

Signed-off-by: Federico Mena Quintero <federico@novell.com>
This commit is contained in:
Federico Mena Quintero 2009-09-04 13:42:46 -05:00 committed by Benjamin Otte
parent 5ea265ca61
commit 112d2430be

View File

@ -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);