C# 4.0 has WeakMap's too, and one of the goals was to work around the cyclical reference issue:
http://blogs.msdn.com/b/clrteam/archive/2009/05/18/the-conditional-weak-table-enabling-dynamic-object-properties.aspx -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Allen Wirfs-Brock Sent: Friday, October 29, 2010 3:04 PM To: Allen Wirfs-Brock; felix; Brendan Eich Cc: Andreas Gal; es-discuss Subject: RE: Concerns about weak refs and weak maps. Oops, typo fixed below > -----Original Message----- > From: [email protected] [mailto:es-discuss- > [email protected]] 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: [email protected] [mailto:es-discuss- > > [email protected]] 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 _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

