Reduce the size of the LRU cache by 2

This commit is contained in:
Cameron Gutman 2015-02-26 21:04:40 -05:00
parent 366a1c91b8
commit c5293ef21f

View File

@ -7,7 +7,7 @@ import com.limelight.LimeLog;
public class MemoryAssetLoader implements CachedAppAssetLoader.CachedLoader {
private static final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024);
private static final LruCache<String, Bitmap> memoryCache = new LruCache<String, Bitmap>(maxMemory / 4) {
private static final LruCache<String, Bitmap> memoryCache = new LruCache<String, Bitmap>(maxMemory / 8) {
@Override
protected int sizeOf(String key, Bitmap bitmap) {
// Sizeof returns kilobytes