On Sat, May 14, 2011 at 4:21 PM, Oliver Hunt <[email protected]> wrote:
> > On May 14, 2011, at 4:03 PM, David Bruant wrote: > > > Le 15/05/2011 01:01, Oliver Hunt a écrit : > >> No, I am wrong, if i have a key that i can ever reuse, the map is > strong, because the key will keep the value live. These aren't weak maps, > they are strong maps that don't leak keys that have become dead. > >> > >> I can kind of see the value of this kind of structure, but I don't > believe it is a WeakMap. > > What is your definition of a WeakMap? > > How is the current strawman different from this definition? > > In the definition of a weak map that I have always known, the key does not > keep the mapped value alive. In the weakmaps proposal the key keeps the > mapped value alive. > Like < http://wiki.ecmascript.org/doku.php?id=strawman:weak_references#a_weakvaluetable >? Is there some prior system that refers to these as WeakMaps? > > So if you can ever lookup a key again, the value cannot be collected, so > your "cache" will hold onto every entry forever. > > > David > --Oliver > _______________________________________________ > 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

