Archive for the ‘WeakReference’ Category

Memory Cache – Part 3

Friday, April 6th, 2012

In the previous part of this series we looked at why caching images may help the performance of our app, so let’s firstly look at a technique for creating a short-lived cache. The items in the cache will only survive until the next GC if they are not strongly referenced, but this can sometimes be desirable if we want to be extremely conservative with resources.
(more…)

DeliciousStumbleUponRedditDiggBookmark/FavoritesShare

Memory Cache – Part 2

Friday, March 30th, 2012

In the previous article we looked at the theory behind weak references. In this article we’ll look at one use-case where a simple memory cache may speed things up.
(more…)

DeliciousStumbleUponRedditDiggBookmark/FavoritesShare

Memory Cache – Part 1

Friday, March 23rd, 2012

Previously on Styling Android we have discussed how important it is to make your app as fast as possible because making your user wait for things to happen is a sure way to drive them away from your app. Also, you have to be quite careful when it comes to using images within your app because images tend to be relatively large and even minor inefficiencies in image handling can have a major impact on your app. In this series of articles we’re going to look at a technique of using a memory cache for images to avoid having to hold multiple copies of the same image in memory when that image is used multiple times in your layout.
(more…)

DeliciousStumbleUponRedditDiggBookmark/FavoritesShare