Re[2]: [Gc] weak maps and libgc

Ivan Maidanski ivmai at mail.ru
Fri Feb 24 08:25:32 PST 2012


Hi Andy,

My idea is to use hidden pointer to object as hash map key and register finalizer (probably chaining with the client finalizer) for object which deletes the entry in the map.

PS. I wonder whether it's possible in Java? (PhantomReference keeps the reference to object while it is alive but you can't get that reference.) 


24 02 2012, 03:57 Hans Aberg <haberg-1 at telia.com>:
> On 23 Feb 2012, at 22:15, Andy Wingo wrote:
> 
> > Does anyone have ideas about how you could make a weak map whose entries
> > are present until the object is actually collected?
> 
> Might it be related to the two-heap problem (collected & uncollected) discussed before here on this list?
> 
> Hans
> 
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com
> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
> 



More information about the Gc mailing list