How to clear global variables declared in tabs?

I splited my program to tabs and in every tab i have a part where i declare global variables and than a number of functions using those variables. when those functions finishes their job, the program will return to the first tab where the setup and the main loop is and from there it will jump to another tab. problem is the global variables i declared are still occupying the memory. how do i clear them?

for example: the base tab is:

void setup()
{
//setup stuff
} 

void loop()
{
func_a(); //go to function a
func_b(); //go to funtcion b
}

the secount tab is:

global_variable_a=0;

func_a()
{
//func_a stuff using global_variable_a
}

the third tab is:

global_variable_b=0;

func_b()
{
//func_a stuff using global_variable_b
}

so the problem is that when i'm in func_b or in the void loop the global_variable_a is still occupying the memory (if i'm using Serial.println(global_variable_a) in func_b it will show me the variable data, even if i'm not in the same tab. so how do i erase it from the memory? (i'm buiding a big program with many tabs and many global variables in each one of them and i don't want the stack to "explode")

when those functions finishes their job, the program will return to the first tab where the setup and the main loop is and from there it will jump to another tab.

Completely and absolutely wrong.

When the IDE does it's thing, all the ino files are merged into a single cpp file for the preprocessor and compiler to deal with.

problem is the global variables i declared are still occupying the memory. how do i clear them?

You can't. That was the reason for making them global. If that's not the behavior you want, don't overuse global variables.

i'm buiding a big program with many tabs and many global variables in each one of them and i don't want the stack to "explode"

You have no concept what the compiler is doing. You need to figure that out.

I agree with what @PaulS has said.

You may also be interested to know that the Arduino system adds the extra .ino files (tabs) in alphabetical order and while later files can see the global variables in earlier files the opposite is not true.

It may be easier to keep track of memory usage by defining all the global variables in the project .ino file

If you don't need global variables you should use local variables declared within the relevant functions.

From a memory usage point of view a static local variable will be pretty much the same as a global variable.

...R