Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Out of memory while listing applications #2094

Closed
krzych111111 opened this issue Dec 22, 2014 · 8 comments
Closed

Out of memory while listing applications #2094

krzych111111 opened this issue Dec 22, 2014 · 8 comments

Comments

@krzych111111
Copy link

Described here: http://forum.xda-developers.com/showpost.php?p=57678163&postcount=13233

@M66B
Copy link
Owner

M66B commented Dec 22, 2014

Now that I have looked at the code, there is little that can be done, because loadIcon will load the bitmap in memory and I see no obvious way to prevent this.

@M66B M66B changed the title Force closes caused by out of memory Out of memory while listing applications Dec 22, 2014
@M66B M66B closed this as completed Dec 22, 2014
@krzych111111
Copy link
Author

Closing this because you do not have any wish to investigate.

Further reading here: http://forum.xda-developers.com/showpost.php?p=57682905&postcount=13249

@krzych111111
Copy link
Author

Ow, you did close it a hour ago, lol - nice :D

@M66B
Copy link
Owner

M66B commented Dec 22, 2014

I closed it after commenting on XDA I don't see things which can be improved.

@M66B
Copy link
Owner

M66B commented Dec 23, 2014

What you can try is this in the manifest:

android:largeHeap="true"

@M66B
Copy link
Owner

M66B commented Dec 23, 2014

Also read this and you will see this problem will at least not have a straightforward solution:
http://stackoverflow.com/questions/16958879/getting-a-lot-of-app-icons-make-out-of-memory

@M66B
Copy link
Owner

M66B commented Dec 23, 2014

Another thing to try is to call System.gc() in HolderTask.doInBackground (ActivityMain.java)

M66B added a commit that referenced this issue Dec 23, 2014
@M66B
Copy link
Owner

M66B commented Dec 23, 2014

Since there is a way to directly access an application icon, I have tried scaling down, but this is too slow to be useful.

What might help is disabling the icon cache. Could you please try this version to see if it solves your problem: https://crowd.xprivacy.eu/XPrivacy_3.5.7icon.apk

@M66B M66B mentioned this issue Dec 24, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants