I initialize these lists at the start of my strategy, and apply list.Clear() to them in the OnTermination block of my code, but it seems like they are never released from memory.
This becomes a significant issue if I am performing optimizations, since the memory usage from NinjaTrader quickly escalates (To the point after ~1500 optimizations, it is using all of the 12GB of RAM that I have installed).
Even if I close the strategy analyzer window, and only leave the main control center open (ie, I don't have any charts, etc open) this memory still isn't released. The memory usage from NT will stay at that elevated value (~12GB) until I close and restart the program.
Is there something that I am missing here? MSDN says that the garbage collector should automatically clean up these lists after they're not needed any more, but it seems like NT is keeping them open for some reason.
I would appreciate any advice on the matter....
Thanks
Comment