diff --git a/CHANGELOG.md b/CHANGELOG.md index d592d8c83b..3bfbc605c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ own the property `path` of type `AbstractPath` instead of the `GeometryPath` unn been added to these forces to provide access to concrete path types (e.g., `updPath`). In `Ligament` and `Blankevoort1991Ligament`, usages of `get_GeometryPath`, `upd_GeometryPath`, etc., need to be been updated to `getGeometryPath`, `updGeometryPath`, etc., or a suitable alternative. +- Fixed a minor memory leak when calling `OpenSim::CoordinateCouplerConstraint::setFunction` (#3541) v4.4.1 ====== diff --git a/OpenSim/Simulation/SimbodyEngine/CoordinateCouplerConstraint.h b/OpenSim/Simulation/SimbodyEngine/CoordinateCouplerConstraint.h index 0d76622ed6..1610506f02 100644 --- a/OpenSim/Simulation/SimbodyEngine/CoordinateCouplerConstraint.h +++ b/OpenSim/Simulation/SimbodyEngine/CoordinateCouplerConstraint.h @@ -109,7 +109,7 @@ OpenSim_DECLARE_CONCRETE_OBJECT(CoordinateCouplerConstraint, Constraint); return function.getValue(); } void setFunction(const Function &aFunction) - { set_coupled_coordinates_function(*aFunction.clone());} + { set_coupled_coordinates_function(aFunction); } void setFunction(Function *aFunction) { set_coupled_coordinates_function(*aFunction); }