If I have activity, let's say main activity, and in there I have global vars
If I finish the activity, is it still valid using those vars (reading and writing data to it?) - if yes how come, if now any suggestions (I notice that even I activity.finish the activity, vars are still valid)
You should read the beginners guide, it has a chapter dedicated to activities life cycle.
Activities are not killed on app exit, and the resources are not freed up... They go "background" and only when the OS needs those resources it will be killed.
"GlobalCode module"?? I guess you mean Code Modules... They are only containers for in-app often used code, so variables set by these modules, behave the same as any others...
The problem is, you'll never know when your app resources are going to be freed.