Hi Guys! As lots of people do, I use Map and SoftReference to create image cache to cache downloaded image.
In my implementation, the latest used bitmap will be putted at the first element of Map, so, when the image cache reach max cache size, the last element of the Map which is long-time not used will be removed, and SoftReference makes sure the bitmap will be recycled.
Here is the problem: how can I be sure the removed bitmap is not being used(like, draw on the screen, etc. etc.) when it is recycled. If the bitmap is being used, will SoftReference gc it? It is really difficult to understand what "Reachability" means in the api doc.
Thanks in advance!