Download MetaTrader 5

leaked memory?

To add comments, please log in or register
Jinsong Zhang
15780
Jinsong Zhang  

I have opened position and run follow script:

 

#include <Trade/Trade.mqh>
void OnStart()
{
   int slippage=10;
   CTrade *OrderClose = new CTrade;
   if(OrderClose.PositionClose(_Symbol,slippage*_Point)==true)Print("OK");else Print("false");


}
then I find message "312 bytes of leaked memory" in Experts tab. What dose it means?
Rashid Umarov
Admin
11993
Rashid Umarov  
You should obviously delete dynamical object yourself. See article The Order of Object Creation and Destruction in MQL5

To add comments, please log in or register