KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I know there is a WeakHashMap in java.util , but since it uses WeakReference s for everything, which is only referenced by this Map , referenced objects will get lost on the next GC cycle. So it's nearly useless if you want to cache random data, which is very likely to be requested again without being Hard-linked the rest of the time. The best solution would be a map, which uses SoftReference s instead, but I didn't find one in the Java RT Package.
Tags (comma-separated)
Save Edits
Cancel