returns the execution policy. - page 4

 
prostotrader:

You have to do it like this:

thank you)
 
And please also explain what to do in deinitialisation. I've seen in the code that only instances of classes are deleted. And variables and arrays need to be zeroed? What good does it do, anyway? What if classes are not deleted? Will they remain in memory until the terminal is shut down or even afterwards?
 
Ivan_Invanov:
And please also explain what to do in deinitialization. I've seen in the code that only instances of classes are deleted. And variables and arrays need to be zeroed? What good does it do, anyway? What if classes are not deleted? Will they remain in memory until the terminal is shut down or even afterwards?

Only objects created via new should be deleted.

 
Dmitry Fedoseev:

Only objects created via new should be deleted.

Thank you. Why?
 
Ivan_Invanov:
Thank you. And why is that?

Because it doesn't remove itself.

 
Dmitry Fedoseev:

Because it doesn't remove itself.

And if you close the terminal, does it stay?
 
Ivan_Invanov:
And if you close the terminal, will it stay?

I think it will be removed, but not for sure. Don't get your hopes up. You create it, you delete it.

 
Dmitry Fedoseev:

I think it will be removed, but not for sure. Don't get your hopes up. You create it, you delete it.

It is deleted, exactly, they just need to control the created objects. This is necessary for a programmer to know what and where he creates and deletes, it reduces the probability of errors associated with memory leaks during the operation of programs.
 
Thank you all for your answers.
 
Please clarify the situation with operators == and != . If comparable variables are represented as true when they have any non-zero value (in help it is written so). How arrays are represented then? And why in this example there is a comparison "not equal to two", why exactly two, if any non-zero value is true, if there is no difference, if it was 1, why does it say exactly 2 ? Here is code from official example (from Moving Average 2009-2017 v1.00 line 132).
MqlRates rt[2];
//--- go trading only for first ticks of new bar
   if(CopyRates(_Symbol,_Period,0,2,rt)!=2)
     {
      Print("CopyRates of ",_Symbol," failed, no history");
      return;
     }

1. Is it true that any non-zero value is true when compared in the operators "==" , "!=" ?

2. How is an array represented? How can it be compared to a number at all?

3. Why is there a "2" in the comparison ? If according to the help truth is any non-zero value, then it is logical to write "1".

4. Did the condition if CopyRates got an error ?

Reason: