chrisbanes/Android-BitmapCache

NullpointerException. mRecyclePolicy is null

recodyx opened this issue · 2 comments

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?

+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.

+1 too. Strange behavior.