pkoutsivitis:
It's not true.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 .
Dynamic memory allocation in MQL5:
- When working with dynamic arrays, released memory is immediately returned back to the operating system.
- 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:
Thanks for your fast response.
I resolve it.
Finally was my fault.
When running a eternal script, we only have one OnStart()
How memory is released to operating system? ArrayResize consume dynamic memory, how to force a garbage collector in this cases?
Roberto Spadim:
ArrayFree().
When running a eternal script, we only have one OnStart()
How memory is released to operating system? ArrayResize consume dynamic memory, how to force a garbage collector in this cases?
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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