Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Java
Out of memory with file streams
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Mark Space, post: 3483698"] I've seen an article or white paper on this, I think from Sun. They said to put all references in a regular old Map (HashMap, etc.), then use one weak or soft reference to the map itself. SoftReference cache = new SoftReference( new HashMap() ); Then, when the GC needs to collect this, it sees one soft reference, frees that, and then can automatically free everything in the hash map without any more checking or involved processing. It's much much lighter on the GC than using a weak hash map, which makes the GC check every single weak reference. I'll try to find that article, I don't see it right now.... [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Java
Out of memory with file streams
Top