Back to project page Android-Lib-AsyncImageLoader.
The source code is released under:
Apache License
If you think the Android project Android-Lib-AsyncImageLoader listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package android.lib.asyncimageloader; //w w w .j a v a 2 s. co m import java.lang.ref.SoftReference; import android.graphics.Bitmap; import android.support.v4.util.LruCache; final class BitmapCache extends LruCache<String, SoftReference<Bitmap>> { public BitmapCache(final int maxSize) { super(maxSize); } @Override protected void entryRemoved(final boolean evicted, final String key, final SoftReference<Bitmap> oldValue, final SoftReference<Bitmap> newValue) { if (oldValue != null) { final Bitmap bitmap = oldValue.get(); if (bitmap != null) { if (!oldValue.get().isRecycled()) { oldValue.get().recycle(); } } } } }