First, I'll cheekily answer what you asked instead of what you meant to ask:
One of the important properties of post-mortem finalization is that it is *not* triggered by the collection of the weakref itself, and is not triggered if the weakref is co-condemned with the object it points at. On your real question, the answer is no. This might be appropriate as parts of the guts of some fancy debugger as you suggest. But as something generally available in the language, its cost would be prohibitive. On Wed, Nov 6, 2013 at 11:18 AM, Brian Di Palma <[email protected]> wrote: > Are these callbacks triggered for the garbage collection of any object > or just weakrefs? > They could be useful to help track down memory leaks, although the > tooling in Chrome is quite good for that. > > On Wed, Nov 6, 2013 at 7: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? > > _______________________________________________ > > es-discuss mailing list > > [email protected] > > https://mail.mozilla.org/listinfo/es-discuss > -- Cheers, --MarkM
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

