This week's book giveaway is in the General Computing forum. We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line! See this thread for details.
I deal in a GUI with a lot images(gufs, jpgs) and because some of them are uses in more than one place I try to manage them with via a casche mechanism. So I build a pool where I keep all my the imaget that I use(see the code below).
I know that a similar map mechanism exist already for WeakReferences (java.util.WeakHashMap) but I use (explicit) the soft references for them quality - the garbage collector might clear a soft reference but always clears a weak referencen. It this ok ? There are also other opinion about this?