Re: [Gc] Disappearing link unregistration

Ivan Maidanski ivmai at mail.ru
Sat May 12 12:57:42 PDT 2012


Hi Alex,

1. All dangling disappearing links are removed by GC_finalize.
So, you don't need to unregister it (the only exception when you manually free A).

2. I think doing disappearing link unregistering from finalizer of A is not good idea.

Regards.

Sat, 12 May 2012 17:48:04 +0200 Alex Rønne Petersen <xtzgzorex at gmail.com>:
> Hi,
> 
> If I allocate an object A and an object B and register a disappearing
> link from A to B (i.e. A is the weak reference), do I have to
> explicitly unregister the disappearing link from A to B when A becomes
> garbage? If so, is registering a finalizer that does this the best
> approach? If not, is doing it anyway going to improve performance or
> be beneficial in some way?
> 
> Regards,
> Alex
> _______________________________________________
> 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