I was playing around with cppcheck and it reports memory leaks [here](https://github.com/opensim-org/opensim-core/blob/master/OpenSim/Analyses/InverseDynamics.cpp#L436) and [here](https://github.com/opensim-org/opensim-core/blob/master/OpenSim/Analyses/StaticOptimization.cpp#L536).