simulateCS already respects the terminate parameter, but simulateME always calls fmu.terminate() at the end of each simulation.
When reusing an FMU instance accross many simulations this accumulates memory usage.
Expected behavior
simulateME should pass terminate through its internal logic and guard the fmu.terminate() call with if terminate: .., consistent with simulateCS
simulateCSalready respects theterminateparameter, butsimulateMEalways callsfmu.terminate()at the end of each simulation.When reusing an FMU instance accross many simulations this accumulates memory usage.
Expected behavior
simulateMEshould passterminatethrough its internal logic and guard thefmu.terminate()call withif terminate: .., consistent withsimulateCS