Build 2085 - Pointer data returned are cleaned after return from a function
Rafael Caetano Pinto:
I dont known the build that broken this, but the code below does not work anymore:
The console return is:
It's normal behaviour.
I dont known the build that broken this, but the code below does not work anymore:
The console return is:
On debugging, i notice that the step into line "return &list;" goes to CArrayList constructor.
It's a language behavior or is a garbage collector MT5 bug?
You can do so.
Create a global pointer variable and initialize the object with "new" in OnInit.
Also destroy the Object at OnDeinit using "delete".
Very simple and straight forward.
The console return is:
On debugging, i notice that the step into line "return &list;" goes to CArrayList constructor.
It's a language behavior or is a garbage collector MT5 bug?