In the screen cap from MSVS below, heap snapshots occurred as follows:
1. Start NT clean (no charts), open Strategy Analyzer (SA) and set up a multi-objective optimization which will run 5 iterations (I have 4 cores) -> Snapshot #1
2. Run SA optimization, wait until complete and GC triggers at least once -> Snapshot #2
3. Run same optimization again -> Snapshot #3
4. Run same optimization again* -> Snapshot #4
5. Close Strategy Analyzer and wait for GC to run at least once -> Snapshot #5
Durring #4, NT regularly stops responding (white-out, system message), and after 5 NT is frequently similarly unresponsive until I terminate its process.
Looking at the heap diffs, it appears the largest increase in memory usage is allocations of new NinjaTrader.NinjaScript.Series<Double> objects.
I've tried running with IsInstantiatedOnEachOptimizationIteration both true and false, and it doesn't appear to make a difference.
Is the strategy or are custom indicators responsible for releasing indicators in State.Terminated? (I haven't seen this in examples and have assumed not.) Any ideas or suggestions for reducing/freeing up heap between passes?
Comment