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



Sorry for crying wolf.

The code I was looking at was validate_up_down_linkage() in main.c in at-poke.

I was calling Accessible_unref() on the value returned from 
Accessible_queryInterface() and then subsequently finding that calling 
Accessible_unref() on the value returned by Accessible_get_parent() was causing 
problems.

Padraig

> Subject: Re: [g-a-devel]Accessible_unref() and leaks
> To: "Padraig O'Briain" <Padraig Obriain sun com>
> Cc: accessibility mailing list <gnome-accessibility-devel gnome org>
> Content-Transfer-Encoding: 7bit
> Mime-Version: 1.0
> 
> Hi Padraig,
> 
> 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().
> 
> 	That sounds _extraordinarily_ odd;
> 
> 	If you look at at-spi/libspi/accessible.c (..._get_parent) you see it
> calls spi_accessible_new_return with a FALSE release_ref - such that
> this doesn't release the ref on the parent - I imagine because I checked
> that atk_object_get_parent returned a ref on it's parent;
> 
> 	It seems to do the CORBA ref counting just fine.
> 
> > Is this what we expect to happen?
> 
> 	No; but I don't see how the CORBA ref count can be wrong off hand;
> which ref count is not getting set correctly ?
> 
> > If not, should this be fixed in at-spi or in gail?
> 
> 	Hard to say.
> 
> 	Incidentally, if you're beggining to notice performance issues with
> un-reffing stuff; there are 2 strategies I think we could take:
> 
> 	a) Idle unreffing of the cspi reference cache;
> 	b) Async unrefs.
> 
> 	b) Is pretty easy to implement, I plan to do it in libbonobo for 2.2;
> such that a bonobo_release_unref (obj, NULL); will never block /
> re-enter.
> 
> 	HTH,
> 
> 		Michael.
> 
> -- 
>  mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot
> 




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