On Apr 27, 9:27 pm, Dianne Hackborn <hack...@android.com> wrote:
> On Wed, Apr 27, 2011 at 6:56 PM, Eric <e...@alum.mit.edu> wrote:
> >  Hopefully the documentation can also be updated to
> > remove any doubt whatsoever that an Activity cannot possibly be
> > 'removed' from memory in low-memory situations (when the process is
> > _not_ killed), that would result in an inconsistent or leak state by
> > not having balanced lifecycle methods called.
>
> The only thing that happens in low-memory situations is processes being
> killed.

Yes, thank you for clarifying that, but unfortunately the
documentation lead one to believe that Activities that are already
paused can somehow be removed from memory by a different mechanism
other than killing the process.  For example,

http://developer.android.com/reference/android/app/Activity.html

"If an activity is paused or stopped, the system can drop the activity
from memory by either asking it to finish, or simply killing its
process"

Note the 'either', 'or' language.  I assume this situation is meant to
address an Activity stack:

  A1, A2, A3

Where A3 was just started, but the system is so low on memory that it
'drops' the activities A1 and A2 from memory using the nebulous
mechanism described in the documentation.  The nebulous mechanism is
described as 'the Activity being asked to finish'.  However, my
understanding of 'finishing' an Activity was that once an Activity is
'finished' it never again returns to the screen unless being
explicitly started again.  Therefore, I took the 'finish' in that
above documentation to mean that Android removes the Activity from
memory some other way, where the normal lifecycle is not followed.
Hence the reason why I wrote this post in the first place.

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to