You need to complete your implementation of Activity lifecycle.

See here:

http://developer.android.com/guide/topics/fundamentals.html#actlife

Add overrides for onPause or onStop and do your cleanup there. Recreate the singleton in a matching call, onResume or onStart.

-- Kostya

01.09.2010 21:19, siva пишет:
Hi Firends,

I have a singleton in an activity. When I end my application (like
pressing back button), and start it again after some time, the
singleton is not recreated, but is holding previous state. Singleton
is not destroyed if the application is destroyed? Do I have to null
its static members in onDestroy() to avoid memory leak? Thanks.



--
Kostya Vasilyev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

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