MQL4 Reference Common Functions ZeroMemory


The function resets a variable passed to it by reference.

void  ZeroMemory(
   void & variable      // reset variable



[in] [out]  Variable passed by reference, you want to reset (initialize by zero values).

Return Value

No return value.


If the function parameter is a string, the call will be equivalent to indicating NULL as its value.
For simple types and their arrays, as well as for structures/classes consisting of such types, this is a simple reset.
For objects containing strings and dynamic arrays, ZeroMemory() is called for each element.
For any arrays not protected by the const modifier, this is the zeroing of all elements.
For arrays of complex objects, ZeroMemory() is called for each element.

ZeroMemory() can't be applied to classes with protected members or inheritance.