Robert Green wrote:
> Are you trying to tell me that it's totally safe to throw stuff in
> static fields? 

I wouldn't go with "totally safe", but it's an unfortunate requirement
in some Android cases (e.g., sharing a WakeLock between a
BroadcastReceiver triggered by AlarmManager and a Service doing the
actual work being scheduled to run in the background).

> I've always avoided it because of years of shared
> space in a JVM in web apps.  I know Android uses separate processes
> for each application but is it safe to say that it will kill all of
> your static allocations even if you don't clean them up properly?

Garbage collection rules still hold, until the whole process is killed
(or, I assume, recycled -- I sincerely hope they flush the heap when
they reuse an existing process).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Need Android talent? Ask on HADO! http://wiki.andmob.org/hado

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