Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out of Memory Error #12

Open
rhychel opened this issue Jan 24, 2013 · 1 comment
Open

Out of Memory Error #12

rhychel opened this issue Jan 24, 2013 · 1 comment

Comments

@rhychel
Copy link

rhychel commented Jan 24, 2013

Have you tried it using inside an adapter for listview? It seems that your code is not optimized for loading a lot bitmaps. You may decode the result bitmap from the available Heap memory allocated for the app.

@ipeisong
Copy link

ipeisong commented Apr 9, 2013

I think should change memory cache to recommended LruCache class.
From Google:

In the past, a popular memory cache implementation was a SoftReference or WeakReference bitmap cache, however this is not recommended. Starting from Android 2.3 (API Level 9) the garbage collector is more aggressive with collecting soft/weak references which makes them fairly ineffective. In addition, prior to Android 3.0 (API Level 11), the backing data of a bitmap was stored in native memory which is not released in a predictable manner, potentially causing an application to briefly exceed its memory limits and crash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants