New article The Order of Object Creation and Destruction in MQL5 is published:
Every object, whether it is a custom object, a dynamic array or an array of objects, is created and deleted in MQL5-program in its particular way. Often, some objects are part of other objects, and the order of object deleting at deinitialization becomes especially important. This article provides some examples that cover the mechanisms of working with objects.
MQL5-programs are written in concepts of Object Oriented Programming (OOP), and that not
only opens up new possibilities for creating custom libraries, but also
allows you to use complete and tested classes of other developers. In
the Standard Library, that is included into the MetaTrader 5 Client Terminal, there are hundreds of classes that contain thousands of methods.
m_array got copied from GetPointer(arrray[i]) function, so they become POINTER_AUTOMATIC type.
We don't need line 54:
because MQL5 deletes POINTER_AUTOMATIC for you.