[mono-android] Image caching

Jonathan Pryor jonp at xamarin.com
Wed Jun 20 14:14:21 UTC 2012


On Jun 20, 2012, at 4:24 AM, Jens Bjarke Pedersen wrote:
> I thought about reference counting and call disposal on bitmaps when they are not used. Or do mono droid have any tricks I can use instead :)

I'd instead suggest a Most Recent Used list of ~10 items (change as appropriate) -- when you add/access an item to the MRU, put it at the front, and when you remove an item from the MRU you Dispose() of it. No need for reference counting, and keeps things (moderately) bounded.

 - Jon



More information about the Monodroid mailing list