On Wed, Dec 26, 2012 at 1:38 PM, Mark Murphy <[email protected]>wrote:
> On Tue, Dec 25, 2012 at 8:35 PM, TreKing <[email protected]> wrote: > > I believe it is entirely possible and actually a frequent occurrence that > > Activities are destroyed while processes are not. For example, you might > > open a second Activity within your own app that causes memory pressure - > > your process must keep running to show the second Activity but the first > > Activity, which is now hidden, can be destroyed to reclaim memory. > > According to Ms. Hackborn, this does not happen: > > > http://stackoverflow.com/questions/7536988/android-app-out-of-memory-issues-tried-everything-and-still-at-a-loss/7576275#7576275 I'm aware of that post, it just doesn't seem to match my experience. If you can provide a sample app and steps for reproducing the > activities-get-destroyed-for-memory behavior, I'd love to see it! >From what I see, it would be quite difficult to come up with a reliable repro. As I mentioned in my other post, the common causes of Activity destruction should be off in my case, and indeed for very long stretches of testing I'm used to only see onCreate() executing when I kill my process from DDMS and start it anew. The thing that made me suspect that individual Activities do get collected happened maybe twice, three times, and I believe it was always on customer devices. Is there an exhaustive list anywhere of conditions under which an Activity can be destroyed (and recreated) - things like device rotation under default handling? Perhaps there is one that I'm not aware of that only kicks in very seldom, or is tied just to a particular Android version? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

