[android-developers] Lifetime of static [instance] variables

2011-05-28 Thread Anirvan
hello, for quite some time i was blissfully of the opinion that static [instance] variables exist as long as the app runs. however, to my dismay, and much alarm, i feel that it's not true. for mere testing, i created a static list of strings, and in my main activity class overrode the onDestroy

Re: [android-developers] Lifetime of static [instance] variables

2011-05-28 Thread Kostya Vasilyev
Statics do live as long as the process. onDestroy is not an indication that the process is exiting - your activity is getting destroyed, but the process may (and in your case, does) live on. When you come back to the application, Android uses the same process to create another instance of your

Re: [android-developers] Lifetime of static [instance] variables

2011-05-28 Thread Rajesh Kumar
For blackberry and iphone users http://stealthguards.com/idevaffiliate/idevaffiliate.php?id=1475 On Sunday, May 29, 2011, Anirvan anirvan.majum...@gmail.com wrote: hello, for quite some time i was blissfully of the opinion that static [instance] variables exist as long as the app runs.