On Jul 27, 2012, at 12:36 PM, Matthew Leibowitz <[email protected]> wrote: > Just a thought, it could be a result of the android gc clearing static > variables. > > I noticed this sometimes happens on lower end devices or after a memory > intensive activity.
There's the little matter of how this would happen. Dalvik doesn't know anything about Mono's GC, so Dalvik certainly isn't going to clear it [0]. Mono's GC shouldn't clear them, as they're static fields (and thus GC roots). The only way I can think of for fields to "magically" be cleared is due to process restart, as previously outlined. Even that requires a fair number of assumptions on how the app operates (e.g. assumes that app always opens with Activity1, which sets the static data, so if the process is restarted and launched to Activity2 -- bypassing Activity1 -- some assumed setup code may not have executed.) (Of course, I may simply lack the imagination to think of another way things could break. An easily reproducible testcase would be nice...) - Jon [0] Unless Dalvik has a bug in which it overwrites memory it never allocated. That's such a horrifying thought I'm not going to consider it. _______________________________________________ Monodroid mailing list [email protected] UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid
