On Nov 6, 2013, at 3:14 PM, Rick Waldron <[email protected]> wrote:
> > > > On Wed, Nov 6, 2013 at 2:15 PM, Domenic Denicola > <[email protected]> wrote: > Thanks Mark for the education, especially on the pre- vs. post-morterm > finalization distinction. I don't think I was specifically advocating for > pre-mortem in my OP, since I didn't really understand the difference :P. > Post-mortem finalization sounds quite reasonable. What do people think of > introducing it into ECMAScript? > > This may be a naïve question, but how would the handler know which > object/weakref had been gc'ed? > You wouldn’t :) I’m kind of anti-finalisers in JS for all of the reasons people have raised - they are extremely hazardous, expose non-deterministic behaviour, etc Given our general desire to avoid exposing internal GC semantics, and the difficulty in defining observable GC behaviour (I suspect this would be a non-starter in any case), I can’t see any specification that would allow useful finalisers or WeakRefs. If MarkM has an idea for WeakRefs that don’t leak observable GC behaviour i’d love to hear, but in general i’m opposed to both them and finalisers :-/ —Oliver > Rick > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

