On 3/23/2011 12:37 PM, Jake Colman wrote:
I use the following standard paradigm for singletons: private static MyClass instance = null; public static MyClass getInstance() { if( instance = null ) instance = new MyClass(); return instance; } If my application gets killed by Android, as can be expected, can I reasonably assume that when the application is restarted that instance is reinitialized to null? In other words, when Adroid invisibly kills and restarts my app, its behavior is the same if I had manually started my app myself? Thanks.
"instance == null", not "instance = null"...right? -- 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