GtkTreeStore doesn't fully release
- From: Emmanuel Briot <briot act-europe fr>
- To: gtk-devel-list gnome org
- Subject: GtkTreeStore doesn't fully release
- Date: 22 Jul 2002 11:25:23 +0200
While running my application with "GOBJECTS_DEBUG=objects", I saw the following
problem in GtkTreeStore:
It seems that the GtkTreeStore widget doesn't properly release its contents on
finalize.
Only the root node is currently freed, whereas with the following patch the
whole tree is freed:
- static void
+ static gint
node_free (GNode *node, gpointer data)
{
_gtk_tree_data_list_free (node->data, (GType*)data);
+ return FALSE;
}
static void
gtk_tree_store_finalize (GObject *object)
{
GtkTreeStore *tree_store = GTK_TREE_STORE (object);
- g_node_children_foreach (tree_store->root, G_TRAVERSE_ALL, node_free, tree_store->column_headers);
+ g_node_traverse (tree_store->root, G_POST_ORDER, G_TRAVERSE_ALL, -1, node_free, tree_store->column_headers);
regards,
Emmanuel
GtkAda team
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]