> I found that when I used SoftReferences, they started getting cleared > very quickly indeed, after my cache of thumbnails was up to maybe 20 > or so. > > When I use normal references, the cache grows happily to a couple of > hundred thumbnails without OOMs being thrown. > > Being a java newbie, I don't pretend to understand this, but I went > with normal references and careful OOM catching.
One of the possible reasons, I can think of, why Romain chose to persist the fetched images on SDcard(in his Shelves app) is because when caching is done on heap, the objects keep getting garbage collected so you have to repeat the time consuming fetches. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

