Did you know that MQL 4 comes with documentation? It's that thing where they briefly list and explain features of the language and it's available as help file in the editor and as a web site.
There you can read about OOP basics.
Among other things there is a documentation on Object Delete Operator delete, which is also linked from the page on Object Create Operator new
- docs.mql4.com
Did you know that MQL 4 comes with documentation? It's that thing where they briefly list and explain features of the language and it's available as help file in the editor and as a web site.
There you can read about OOP basics.
Among other things there is a documentation on Object Delete Operator delete, which is also linked from the page on Object Create Operator new
Ah cmon, don´t be like that. If you know the answer to a question it is great if you post it. But try to cut all that <Deleted> beside it. That only spoils the atmosphere here.
Cute, not just unfamiliar with the concept of the documentation and generally lazy, also easily offended.
You waited 24 hours from your question, and it didn't occur to you to check the help file?
Open editor, click on "new" keyword in your code, press F1, read.
There is exactly 5, not very long sentences and code example. The last sentence references the "delete" operator.
How hard is that?
P.S.
I noticed that being mildly sarcastic usually helps people learn to check the documentation before asking obvious questions.
P.P.S
Since I'm not a native English speaker, I use this forum to practice being sarcastic to random people on the internet. Also, seeking another hobby, but haven't found anything better yet.
Just consider yourself half lucky today. You got an answer and some unwanted <Deleted> besides. It's the price of doing business on the internet.
Cute, not just unfamiliar with the concept of the documentation and generally lazy, also easily offended.
You waited 24 hours from your question, and it didn't occur to you to check the help file?
Open editor, click on "new" keyword in your code, press F1, read.
There is exactly 5, not very long sentences and code example. The last sentence references the "delete" operator.
How hard is that?
P.S.
I noticed that being mildly sarcastic usually helps people learn to check the documentation before asking obvious questions.
P.P.S
Since I'm not a native English speaker, I use this forum to practice being sarcastic to random people on the internet. Also, seeking another hobby, but haven't found anything better yet.
Just consider yourself half lucky today. You got an answer and some unwanted <Deleted> besides. It's the price of doing business on the internet.
test t = new test();
- You create an object on the heap. (new)
- You copy the object to object t.
- You loose the handle (;)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
when running the code below MT4 prints:
2020.07.28 11:42:00.097 Class EURUSD,M1: 16 bytes of leaked memory
2020.07.28 11:42:00.097 Class EURUSD,M1: 1 object of type test left
2020.07.28 11:42:00.097 Class EURUSD,M1: 1 undeleted objects left
How to set the memory free again after creating a new object?