Sorry about the format mangling. Resending with simpler formatting which hopefully won't get mangled in transmission.
---------- Forwarded message ---------- From: Mark S. Miller <[email protected]> Date: Sun, Jan 8, 2012 at 5:05 PM Subject: Re: Improving Function.prototype.bind To: Brendan Eich <[email protected]> Cc: John J Barton <[email protected]>, es-discuss < [email protected]> On Sun, Jan 8, 2012 at 3:35 PM, Brendan Eich <[email protected]> wrote: [...] > That's not totally clear now in light of Mark's emulated WeakMap not > leaking in practice. > [...] That's a much stronger claim than I would be willing to make. My emulated WeakMaps leak much less that one would expect, and indeed less than I thought possible when I began the exercise. But the remaining extra leak is still significant for real uses. >From <http://code.google.com/p/es-lab/source/browse/trunk/src/ses/WeakMap.js >: /** * This {@code WeakMap} emulation is observably equivalent to the * ES-Harmony WeakMap, but with leakier garbage collection properties. * * <p>As with true WeakMaps, in this emulation, a key does not * retain maps indexed by that key and (crucially) a map does not * retain the keys it indexes. A map by itself also does not retain * the values associated with that map. * * <p>However, the values associated with a key in some map are * retained so long as that key is retained and those associations are * not overridden. For example, when used to support membranes, all * values exported from a given membrane will live for the lifetime * they would have had in the absence of an interposed membrane. Even * when the membrane is revoked, all objects that would have been * reachable in the absence of revocation will still be reachable, as * far as the GC can tell, even though they will no longer be relevant * to ongoing computation. -- Cheers, --MarkM -- Cheers, --MarkM
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

