Weak references and destructors
P T Withington
ptw at pobox.com
Sun Dec 13 05:02:16 PST 2009
On 2009-12-12, at 18:14, Mark S. Miller wrote:
>> In my experience, it is always a bad idea for the GC to invoke user-code.
> Always? E uses async post mortem finalization to implement distributed
> acyclic GC. Without some way for "GC to invoke user code", I don't see how
> this is possible. Without it, the resulting memory leak is severe enough to
> discourage many good distributed programming patterns.
I guess it depends on how you define "user code". And I should never say 'always'.
My main point was to not give up weak-key tables just because finalization semantics are messy.
More information about the es-discuss