Re: [g-a-devel]leaked objects - basic reference counting tutorial



Hi David,

On Tue, 2002-07-23 at 14:42, David Bolter wrote:
> >	To release a reference you need to do:
> >
> >	Accessible_unref (my_ref);
>
> If my call to Accessible_unref reduces the ref count for that object to 
> 0, is it immediately removed from the hash table?

	I'm suspicious of your question; you taking the ref down to 0 means
that you no longer have any pointers to that reference; whether it goes
from the hash table is a matter of cspi policy and internals; perhaps in
future it could cache them and idly freeing them [ or something similar
] - it can certainly be holding references itself [ over event emission
eg. ]. So ... essentially yes if it hits 0 it should be remotely
unreffed and removed from the hash - for now, but don't rely on it.

> Thanks again Michael, for the info, and the patch.

	No problem, thanks for all the great work on gok.

	Regards,

		Michael.

-- 
 mmeeks gnu org  <><, Pseudo Engineer, itinerant idiot




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