Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
GoogleCodeExporter opened this issue Mar 21, 2015 · 1 comment
Closed

Comments

@GoogleCodeExporter
Copy link

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

Attachments:

@GoogleCodeExporter
Copy link
Author

Fixed

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

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant