An activity can be killed by the OS to free memory. This is new to me, and I have some errors in my program because of this feature.
Questions that I have:
Questions that I have:
- If an activity is killed, it's Globals can/will off course be removed from memory. How about public variables in Process_Globals? Will they remain declared? Or will they just lose their value? Or will they get their initial value back if declared like: public x=42 as int.
- If a variable is declared public in module X, initialized in module Y and assigned a value in module Z. To which module does it belong?
- Since a code module isn't an object but just code: to which module do variables belong that are declared in code modules?
- I read that a service module will be killed only after all other activities are killed. Does this include the current active activity? Is a service module therefore the best place to declare application wide globals? What if if I declare a public variable inside process_global inside the service and initialize it within activity Main. Does this variable than holds it value if Main is killed?
- Is activity 'Main' just an activity like all others regarding activity life cycle? Or will it be killed later than other activities to free memory? It is special in any way but it's name?