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

OutOfMemoryError when close and re-open the app #37

Open
IvanSantosGonz opened this issue Mar 8, 2015 · 0 comments
Open

OutOfMemoryError when close and re-open the app #37

IvanSantosGonz opened this issue Mar 8, 2015 · 0 comments

Comments

@IvanSantosGonz
Copy link

The problem appears when I close and re-open the app, a crash happens because of an out of memory error. This error always happens at init function, when running the user information at the stage of loading the navigation drawer background photo.

I think that it is possible that a reason for the crash is allocating too much memory for the Bitmaps.

I think 2 steps might help here:

  1. Dispose allocated memory with nulling the pointer in "onStop()"
  2. Better manage bitmaps

The following docs can help here:

  1. https://developer.android.com/training/articles/memory.html
    which also mention to "Avoid wasting memory with bitmaps".
  2. https://developer.android.com/training/displaying-bitmaps/manage-memory.html
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

1 participant