Re: atk problems
- From: "Padraig O'Briain" <Padraig Obriain Sun COM>
- To: gtk-devel-list gnome org, alexl redhat com
- Subject: Re: atk problems
- Date: Tue, 4 Feb 2003 11:06:04 +0000 (GMT)
Alex,
Does the attached patch fix the problem?
Padraig
> X-Authentication-Warning: devserv.devel.redhat.com: alexl owned process doing
-bs
> X-X-Sender: alexl devserv devel redhat com
> To: gtk-devel-list gnome org
> cc: padraig obriain Sun COM
> Subject: atk problems
> MIME-Version: 1.0
>
> I have this problem with a leak in nautilus. It seems like a bug in Atk.
>
> In nautilus-icon-container.c:start_rubberbanding() we do:
> accessible = atk_gobject_accessible_for_object
> (G_OBJECT (band_info->selection_rectangle));
> atk_object_set_name (accessible, "selection");
> atk_object_set_description (accessible, _("The selection rectangle"));
>
> And then later we destroy the selection_rectangle object, but it seems the
> accessible object is leaked. Looking at the atkgobjectaccessible code it
> seems like its supposed to add a weak ref on the object and free the
> accessible when the object dies.
>
> However, it seems that atk_gobject_accessible_for_object() doesn't even
> create a AtkGObjectAccessible, but a AtkNoOpObject, and the accessible is
> never freed.
>
> I don't understand how AtkGObjectAccessible is supposed to work, but it
> seems to me that its not working at all.
>
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Alexander Larsson Red Hat, Inc
> alexl redhat com alla lysator liu se
> He's a scrappy gay matador with no name. She's a foxy winged hooker from a
> different time and place. They fight crime!
>
Index: atkgobjectaccessible.c
===================================================================
RCS file: /cvs/gnome/atk/atk/atkgobjectaccessible.c,v
retrieving revision 1.4
diff -u -p -r1.4 atkgobjectaccessible.c
--- atkgobjectaccessible.c 15 Apr 2002 10:54:44 -0000 1.4
+++ atkgobjectaccessible.c 4 Feb 2003 11:08:05 -0000
@@ -91,6 +91,9 @@ atk_gobject_accessible_for_object (GObje
* 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]