Well I am getting my app working pretty good, now I want to make it efficient and there are a number of things I am not clear on. I am not so much concerned about activities, which are nto used much, but rather the services, one of which runs continuously.
1. When something is "Destroyed" will that take out the Process_Global variables? I am currently using a preference manager to to save and look up things when my service is activated. Can I safeley switch some of those to Global variables and would it be more efficient? It would actually be easier for me as I would like some of these reset when the phone is turned off, as preferences they will be permanently saved.
2. for things like PreferenceManager and MediaPlayer I have dimmed these once as Process Globals in a Module because I read somethng about memory leaks if you don't do this. Is this the most effecient or should I dim them in the Sub that uses them when it is called? Does that slow the operation substantially? What are the tradeoffs?
3. Proccess_Globals can be declared in activites, modules, and services and even though they are global it appears that you must still reference them via the module they are in (ie. othermod.myvariable) if it is not the current module. Is there any advantage to including them in a particular module?
Thanks for your input,
Kim
1. When something is "Destroyed" will that take out the Process_Global variables? I am currently using a preference manager to to save and look up things when my service is activated. Can I safeley switch some of those to Global variables and would it be more efficient? It would actually be easier for me as I would like some of these reset when the phone is turned off, as preferences they will be permanently saved.
2. for things like PreferenceManager and MediaPlayer I have dimmed these once as Process Globals in a Module because I read somethng about memory leaks if you don't do this. Is this the most effecient or should I dim them in the Sub that uses them when it is called? Does that slow the operation substantially? What are the tradeoffs?
3. Proccess_Globals can be declared in activites, modules, and services and even though they are global it appears that you must still reference them via the module they are in (ie. othermod.myvariable) if it is not the current module. Is there any advantage to including them in a particular module?
Thanks for your input,
Kim
Last edited: