On Fri, Jan 6, 2012 at 10:50 AM, David Bruant <bruan...@gmail.com> wrote:
> > Your proposal won't be implemented in older browsers. Actually, it is very > likely that your proposal would be implemented in browsers that would > already have weak maps. > Under these conditions. What is the benefit of a native implementation > rather than an WeakMap based polyfill? > > David > > [1] http://code.google.com/p/es-lab/source/browse/trunk/src/ses/WeakMap.js > > > Why would you say that ? This version https://gist.github.com/1569978should works in every browser without problems. I have also tested memory leaks via snapshots through the profiler ... // snapshot, 1.2 Mb function test(){} for (var i = 0, a = []; i < 0xFFFF; i++) a.push({}.boundTo(test)); // snapshot 35.8 Mb a = null; // snapshot, 1.2 Mb Andno WeakMap is used ... am I missing something ? Cheers, Andrea
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss