Monday, December 17, 2012

[android-developers] Avoid OutOfMemory Exception using FragmentManager BackStack

I'm developing a native app, using fragments like facebook.
I've only 1 activity with a top fixed bar and a fragment container below it.
When I navigate into the app, fragments are added to the back stack (like Facebook app), and when I press back button, they are popped rightly.
But I noticed that, if I do a deeper navigation (with a lot of fragment into the back stack), the app crashes with an OutOfMemory Exception.
How to avoid that? How Facebook app can grant a virtually infinite history into the back stack without crashes?

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment