Do local variables get a new address every time they are declared?

 
I'm asking because for what I'm doing I'm worried about overloading the memory.
 
Jeepack: I'm asking because for what I'm doing I'm worried about overloading the memory.

Local variables are created on the stack when a function is called and that stack is released when the function returns. They are temporary, so memory is not overloaded.

Do some research on C/C++. The principles are the same or at least very similar.

 
Jeepack:
I'm asking because for what I'm doing I'm worried about overloading the memory.

Maybe reading the documentation will help ?

https://www.mql5.com/en/docs/basis/variables/local

Documentation on MQL5: Language Basics / Variables / Local Variables
Documentation on MQL5: Language Basics / Variables / Local Variables
  • www.mql5.com
Local Variables - Variables - Language Basics - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Fernando Carreiro #:

Local variables are created on the stack when a function is called and that stack is released when the function returns. They are temporary, so memory is not overloaded.

Do some research on C/C++. The principles are the same or at least very similar.

Alain Verleyen #:

Maybe reading the documentation will help ?

https://www.mql5.com/en/docs/basis/variables/local

Thanks guys, I'll look into this.

Reason: