chrisbanes / Android-BitmapCache

Android-BitmapCache is a specialised cache, for use with Android Bitmap objects.
834 stars 224 forks source link

NullpointerException. mRecyclePolicy is null #40

Open recodyx opened 10 years ago

recodyx commented 10 years ago

Hi. Getting NullpointerException if MemoryCache is disabled.

BitmapLruCache.java:560

... BitmapLruCache.Builder builder = new BitmapLruCache.Builder(App.getContext()); builder.setMemoryCacheEnabled(false); builder.setDiskCacheEnabled(true).setDiskCacheLocation(cacheLocation); ...

Feature?

QuadFlask commented 9 years ago

+1 I want yo use only as disk cache too, but got exception.

builder.setMemoryCacheEnabled(true).setMemoryCacheMaxSize(1);

It works well. But this is stupid solution I think.

formatBCE commented 9 years ago

+1 too. Strange behavior.