In this case in the upper figure "initialize array" is also allocate more and more memory if I run it in cycle?
In other words I don't put "initialize array" in cycle in order to leave allocate more memory.
There is no problem with this code. I'm not sure what Yamaeda is trying to say - I don't see any repeated memory allocation. I see no memory leak nor growth in memory use when I run it.