[gtk+/gtk-3-2] gtktreeviewaccessible: use a value_destroy_func with the cell_info_by_index hash
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-2] gtktreeviewaccessible: use a value_destroy_func with the cell_info_by_index hash
- Date: Sat, 12 Nov 2011 04:10:16 +0000 (UTC)
commit b25621173734ad1c9cee83802f7ac32ab7df20e7
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Wed Nov 9 14:32:32 2011 +0100
gtktreeviewaccessible: use a value_destroy_func with the cell_info_by_index hash
This ensures that we don't leak any GtkTreeViewAccessibleCellInfo when
re-inserting a new one with the same key.
https://bugzilla.gnome.org/show_bug.cgi?id=663694
gtk/a11y/gtktreeviewaccessible.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/a11y/gtktreeviewaccessible.c b/gtk/a11y/gtktreeviewaccessible.c
index 046e253..4ad323c 100644
--- a/gtk/a11y/gtktreeviewaccessible.c
+++ b/gtk/a11y/gtktreeviewaccessible.c
@@ -237,7 +237,8 @@ gtk_tree_view_accessible_initialize (AtkObject *obj,
accessible->idle_expand_path = NULL;
accessible->n_children_deleted = 0;
- accessible->cell_info_by_index = g_hash_table_new (g_int_hash, g_int_equal);
+ accessible->cell_info_by_index = g_hash_table_new_full (g_int_hash,
+ g_int_equal, NULL, cell_info_free);
widget = GTK_WIDGET (data);
tree_view = GTK_TREE_VIEW (widget);
@@ -2845,7 +2846,6 @@ garbage_collect_cell_data (gpointer data)
{
if (!cell_info->in_use)
{
- cell_info_free (cell_info);
g_hash_table_iter_remove (&iter);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]