Download MetaTrader 5

MT5 memory leaks

To add comments, please log in or register
pkoutsivitis
8
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 .

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
25337
Renat Fatkhullin  
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
1204
Ilyas  
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  

Thanks for your fast response.

 

I resolve it.

Finally was my fault. 

To add comments, please log in or register