There is a ObjectMap class which uses WeakMap or Map and falls back to regular 
objects on platforms whether that is not supported.
http://royale.apache.org/asdoc/#!org.apache.royale.utils/ObjectMap 
<http://royale.apache.org/asdoc/#!org.apache.royale.utils/ObjectMap>

It should be a decent replacement for Dictionary (including weak references). 
The only caveat is you need to use get() and set() instead of bracket access.

I just added documentation and cleaned it up a bit.

What’s interesting about that class is I needed to do some weird things with 
the methods to reassign them. They are not showing up in the ASDoc very well…

There might be a better way to declare the method (variable) proxies. Not sure…

HTH,
Harbs

> On Feb 24, 2018, at 9:10 PM, Greg Dove <greg.d...@gmail.com> wrote:
> 
> That might make porting some legacy Flex code a
> lot easier, for example because (iiuc) I think that means Dictionary with
> weak keys could be supported. [3] (and I know Harbs did something related
> to this in the past, maybe some sort of polyfill, can't recall exactly)

Reply via email to