diff options
author | Padraig O'Briain <padraig.obriain@sun.com> | 2003-02-04 12:53:13 +0000 |
---|---|---|
committer | Padraig O'Briain <padraigo@src.gnome.org> | 2003-02-04 12:53:13 +0000 |
commit | d5ec59910d3649af0959ef4be755223c92d40dd6 (patch) | |
tree | 9443d83e5971dbc2ac4423a0ccb40079f2b9dfba /atk/atkgobjectaccessible.c | |
parent | c091e01ff207d2c30fcdd799972fc03a211f50eb (diff) | |
download | atk-d5ec59910d3649af0959ef4be755223c92d40dd6.tar.gz |
Add weak reference so we do not leak the accessible when the object dies.
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.
Diffstat (limited to 'atk/atkgobjectaccessible.c')
-rw-r--r-- | atk/atkgobjectaccessible.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); } |