I can see the screenshots now, but they contain no info about the system memory allocation. There's a performance tab in the task manager where you can see that.

I can start your example script as often as I want and get no memory problem. However the 2015 EURUSD.t1 history is less than 600 MB. I have no >600 MB t1 history at this point - must download it first. If you're tight on memory, you can save some with the LEAN flag.