Speaking about soft references
I actually can think of one situation when one would like to maintain a soft reference to an object, but I don't like that default guideline for soft references is for cache.
The story is - if you can drop any entry (and all) of cache without negatively affecting application (and all entries will be removed by consecutive GCs) then you don't need cache.
If you applicaiton will be affected by cache eviction then you don't want GC affecting evictions, thus you don't want to use soft references.
Simple, huh ?
The story is - if you can drop any entry (and all) of cache without negatively affecting application (and all entries will be removed by consecutive GCs) then you don't need cache.
If you applicaiton will be affected by cache eviction then you don't want GC affecting evictions, thus you don't want to use soft references.
Simple, huh ?