On Wed, Dec 26, 2012 at 2:35 AM, TreKing <[email protected]> wrote:
> On Tue, Dec 25, 2012 at 3:04 PM, Latimerius <[email protected]> wrote: > >> The thing I don't get is how would that be possible if Android doesn't >> collect individual Activity instances, just whole processes. > > > 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. > > Also, even simpler, rotate your device. Activities destroyed. Processes, > not so much. > Yes, you're right in general, however I should have mentioned that the setup of this particular app should, to the best of my knowledge, prevent those common causes of Activity destruction from happening. In particular, the application (which is a game, or perhaps a toy) only has a single Activity in which everything happens. Apart from that, there's only a rather seldom used, quite lightweight preference activity. Also, the manifest is set up so that things like device rotation handling is under application control and don't cause activity destruction. -- 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

