Sorry, I have no idea what you are talking about.

You stash away your state in onSaveInstanceState().  You get it back in
onCreate().

This is not directly related to onPause(), and definitely has nothing to do
with any  kind of constructor written like you show.  (In fact I would
strongly recommend not having a constructor at all on an Activity, it is
mostly a path to what you don't want.)

On Mon, Nov 7, 2011 at 6:42 PM, BCS <[email protected]> wrote:

> I saw this on a post from last January ~ monkey wrench in the works
> represented by Android's handling of image data outside of the Java
> heap ~ seems simple enough to do aggressive nulling but it does not
> sound like Android is doing the right thing here
>
> given that the docs state Activity Lifecycle Android will work on the
> idea that onPause() will be called in anything other than "brutal-
> dump" then one can write to Bundle and get it back when focus returns
> to the application
>
> thus we could just check objects for null and if Object != null
> then .... would the value have been retained?....
>
> seems rather simple - what gives?..
>
> Object value;
>
> MyClass(){ if (value == null) { value=new Object(); } }
>
> then if user wants to flip the phone around maybe we ^do^ need a new
> Object()
>
> maybe not
>
> if phone is filpped 20 times user may have to wait on gc but all of
> that is in the vendor's shop and would have to be hard-wired to work
> with the "whole thing" ~ trying to code away monkey wrench when one
> does not know where it is leads to knarled ....
>
> suggestions on how to design ?..
>
> --
> 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
>



-- 
Dianne Hackborn
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
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

Reply via email to