christophe-hall / as3-commons

Automatically exported from code.google.com/p/as3-commons
0 stars 0 forks source link

Type cache is 'aggresive and forever' with no way to change this #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The cache of Type instances is currently a static Object, which emans that
every Type instance ever created will stay in memory for the entire
lifespan of an application.
Changing the cache into a Dictionary object with weak keys can negate this
problem.

I've attached a patch for the Type class that does this, it also adds a new
static method called resetCache(), calling this recreates the cache
dicitonary, optionally you can specify the weakKeys parameter which will e
passed on to the Dictionary constructor.

The Dictionary is created with weak keys by default.

Original issue reported on code.google.com by ihatelivelyids on 17 Sep 2009 at 2:08

GoogleCodeExporter commented 8 years ago
Fixed

Original comment by ihatelivelyids on 21 Mar 2010 at 2:52