Download MetaTrader 5

MT5 memory leaks

To add comments, please log in or register
Are you used to trading from your smartphone? Mobile version of MetaTrader 5 will suit you best!
pkoutsivitis
8
pkoutsivitis 2012.04.02 11:46 

Metatrader 5 seems that never release memory during script execution

even if i call delete function for dynamic pointers.

MT5 release memory only after then end of script .

During batch processes the memory consumption is increasing in Gigabytes and my system is slowing down.

 

In c++ everything is in local scope after the end of a function is released. 

Or you can use something like free or delete to release dynamic memory.

 

 Have you intension to improve memory managment in next releases ?

 

 Thanks in advance

MetaQuotes
Admin
24952
Renat Fatkhullin 2012.04.02 13:13  
pkoutsivitis:

Metatrader 5 seems that never release memory during script execution

even if i call delete function for dynamic pointers.

MT5 release memory only after then end of script .

It's not true.
Ilyas
1206
Ilyas 2012.04.02 16:01  
Dynamic memory allocation in MQL5:
  1. When working with dynamic arrays, released memory is immediately returned back to the operating system.
  2. When working with dynamic class objects using the new operator, first memory is requested from the class memory pool the garbage collector is working with.
    If there is not enough memory in the pool, memory  is requested from the operating system.
    Garbage collector releases memory back to the operating system immediately after exiting the following event handling functions:

pkoutsivitis
8
pkoutsivitis 2012.04.03 08:37  

Thanks for your fast response.

 

I resolve it.

Finally was my fault. 

To add comments, please log in or register