Re: [g-a-devel]Accessible_unref() and leaks



On Tue, 2002-09-17 at 07:58, Padraig O'Briain wrote:
> While sweeping at-poke for leaks I found that I needed to call 
> Accessible_unref() on the return value from Accessible_getChildAtIndex() but not 
> from the return value from Accessible_getParent().
> 
> Is this what we expect to happen?

It does seem inconsistent.  All the "child" returning methods such as
getAccessibleAt, etc.  are incrementing the reference count.

I think this is a bug; it seems to me that we agreed that in at-spi
(unlike gail), "all" accessor methods should increment the reference
count.

However this is a significant change, even if the existing behavior is
wrong; fixing this will cause existing programs using getParent() to
leak... and when they are fixed, it will tie them to a 'fixed' version
of at-spi.

> If not, should this be fixed in at-spi or in gail?

This shouldn't affect gail I believe, since ATK is more explicit about
the methods that do and don't increment the refcount and I believe the
ATK conventions (in which some accesor methods increment the refcount
and some do not) are correct/consistent.  

-Bill

> 
> Padraig
> 
> _______________________________________________
> Gnome-accessibility-devel mailing list
> Gnome-accessibility-devel gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-accessibility-devel





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