[g-a-devel]Proposed patch forv at-poke.



The attached patch for at-poke fixes leaking of accessibles when a window in the 
application is deleted.

OK to commit?

Padraig
cvs server: Diffing .
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/at-poke/ChangeLog,v
retrieving revision 1.30
diff -u -p -r1.30 ChangeLog
--- ChangeLog	12 Aug 2002 16:58:51 -0000	1.30
+++ ChangeLog	30 Aug 2002 09:28:55 -0000
@@ -1,3 +1,13 @@
+2002-08-30  Padraig O'Briain   <padraig obriain sun com>
+
+	* src/accessible-tree-model.c
+	(model_node_destroy): Call Accessible_unref() for accessible in the
+	node so that the ref count for the corresponding accessible object 
+	in the application will be correct; i.e. it will be deleted when
+	the corresponding widget is deleted.
+	(model_node_children_changed): Emit warning message generated when 
+	window is being destroyed when DEBUG_TREE is defined.
+
 2002-08-12  Michael Meeks  <michael ximian com>
 
 	* src/accessible-tree-model.c
cvs server: Diffing glade
cvs server: Diffing icons
cvs server: Diffing src
Index: src/accessible-tree-model.c
===================================================================
RCS file: /cvs/gnome/at-poke/src/accessible-tree-model.c,v
retrieving revision 1.18
diff -u -p -r1.18 accessible-tree-model.c
--- src/accessible-tree-model.c	12 Aug 2002 16:58:52 -0000	1.18
+++ src/accessible-tree-model.c	30 Aug 2002 09:28:56 -0000
@@ -144,6 +144,7 @@ model_node_destroy (GtkTreeModel *model,
 
 	make_iter (model, node, &iter);
 	path = gtk_tree_model_get_path (model, &iter);
+ 	Accessible_unref (MODEL_NODE (node)->accessible);
 
 	mnode_destroy (ACCESSIBLE_TREE_MODEL (model), node->data);
 	g_node_destroy (node);
@@ -247,9 +248,12 @@ model_node_children_changed (AccessibleT
 		/*
 		 * This is not neccesarily an error - quite possibly
 		 * we're getting events from a tree we're not interested
-		 * in which is quite ok.
+		 * in or a tree which is in the process of being deleted
+		 * which is quite ok.
 		 */
+#if DEBUG_TREE
 		g_warning ("Changed ('%p') in another tree model !", source);
+#endif
 		return;
 	}
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]