summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--atk/atkgobjectaccessible.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index fb34bd9..59a0d2f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-02-04 Padraig O'Briain <padraig.obriain@sun.com>
+
+ * atk/atkgobjectaccessible.c (atk_gobject_accessible_for_object):
+ Add weak reference so we do not leak the accessible when the object
+ dies. Problem reported by Alex Larsson.
+
2003-02-02 Fatih Demir <kabalak@gtranslator.org>
* configure.in: Added "tr" (Turkish) to the languages' list.
diff --git a/atk/atkgobjectaccessible.c b/atk/atkgobjectaccessible.c
index 41b4def..4267c50 100644
--- a/atk/atkgobjectaccessible.c
+++ b/atk/atkgobjectaccessible.c
@@ -91,6 +91,9 @@ atk_gobject_accessible_for_object (GObject *obj)
* The AtkObject which was created was not a AtkGObjectAccessible
*/
quark_accessible_object = g_quark_from_static_string ("accessible-object");
+ g_object_weak_ref (obj,
+ (GWeakNotify) g_object_unref,
+ accessible);
}
g_object_set_qdata (obj, quark_accessible_object, accessible);
}