Concerns about weak refs and weak maps.

Allen Wirfs-Brock Allen.Wirfs-Brock at microsoft.com
Fri Oct 29 15:04:04 PDT 2010


Oops, typo fixed  below

> -----Original Message-----
> From: es-discuss-bounces at mozilla.org [mailto:es-discuss-
> bounces at mozilla.org] On Behalf Of Allen Wirfs-Brock
> Sent: Friday, October 29, 2010 12:24 PM
> To: felix; Brendan Eich
> Cc: Andreas Gal; es-discuss
> Subject: RE: Concerns about weak refs and weak maps.
> 
> > -----Original Message-----
> > From: es-discuss-bounces at mozilla.org [mailto:es-discuss-
> > bounces at mozilla.org] On Behalf Of felix
> > Sent: Friday, October 29, 2010 12:18 PM
> > To: Brendan Eich
> ...
> > >
> > > Yet don't Java and .NET have weak-keyed maps of some sort?
> >
> > Java has WeakHashMap, which is a map of weak references to values,
> > which can leak uncollectible garbage if you have a cycle of
> > WeakHashMap entries holding references to objects that are not otherwise
> referenced.
 
Which is the problem addressed by the proposed ephemeron-like Weak Map solution for ECMAScript



More information about the es-discuss mailing list