
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
I'm using the Include File shown above only during the development and testing stage of a new EA. I want to ensure, that I do not have any memory leaks.
Later during life operation I simply do not include the file.
Matthias
Hi,
just for clarity and better understanding.
In contribution #6 of this thread I presented my version of an include file for checking and identifying memory leaks. Let us name this file "check_for_memory_leaks.mqh".
The following little script with name "little_script.mq5" uses this header file:
Now I want to preprocess the source code by the following command:
cpp little_script.mq5 -E
The output is
Please see the two bold marked lines
This is for clarity.
Matthias
PS: cpp is part of the GNU compiler collection of cygwin
Hi,
just for clarity and better understanding.
In contribution #6 of this thread I presented my version of an include file for checking and identifying memory leaks. Let us name this file "check_for_memory_leaks.mqh".
The following little script with name "little_script.mq5" uses this header file:
Now I want to preprocess the source code by the following command:
cpp little_script.mq5 -E
The output is
Please see the two bold marked lines
This is for clarity.
Matthias
PS: cpp is part of the GNU compiler collection of cygwin
Neither gcc nor g++ work with extension .mq5; but cpp does! God knows why
Neither gcc nor g++ work with extension .mq5; but cpp does! God knows why
Thank for the tip. Yes I know about the dangers/issues you mentioned. That is why I use macros very seldom and preferentially only during the development and testing stage of a project.
And I'm using the statement "cpp <file> -E" for preprocessing the source code in order to see the real code.
I try to avoid these techniques during the life stage with real money...
Matthias
BTW: In the header file " check_for_memory_leaks.mqh" I removed/outcommented the first line "#include <Generic/HashMap>" before calling cpp...
Thank for the tip. Yes I know about the dangers/issues you mentioned. That is why I use macros very seldom and preferentially only during the development and testing stage of a project.
And I'm using the statement "cpp <file> -E" for preprocessing the source code in order to see the real code.
I try to avoid these techniques during the life stage with real money...
Matthias
BTW: In the header file " check_for_memory_leaks.mqh" I removed/outcommented the first line "#include <Generic/HashMap>" before calling cpp...
Yes. - Do you want to publish this in Code-Base maybe?? For me this is fine, you may go ahead, if you wish to do so.... - Maybe you would claim GPLv2 license on it. Thats what I do with my published code.
I think about it.
Yes. - Do you want to publish this in Code-Base maybe?? For me this is fine, you may go ahead, if you wish to do so.... - Maybe you would claim GPLv2 license on it. Thats what I do with my published code.
Please see https://www.mql5.com/en/code/45873
This is my first publication, may be clumsy
Please see https://www.mql5.com/en/code/45873
This is my first publication, may be clumsy