diff options
author | idontgetoutmuch <dominic@steinitz.org> | 2018-02-07 07:22:51 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-07 07:22:51 -0700 |
commit | d83b17190029c11e3ab8b504e5cdc917f5863120 (patch) | |
tree | ad683cd8246cfc7e770cfca07aa788795bfdeac8 /packages/gsl | |
parent | 8cb879a4ad83656bc70652957a08113e2b784886 (diff) | |
parent | 594a77198f154de54f5aa3395b22b2536a9ecc4c (diff) |
Merge pull request #250 from regnat/fix-gsl-memleak
GSL.ODE: free the jacobian after use
Diffstat (limited to 'packages/gsl')
-rw-r--r-- | packages/gsl/src/Numeric/GSL/ODE.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/packages/gsl/src/Numeric/GSL/ODE.hs b/packages/gsl/src/Numeric/GSL/ODE.hs index c4fab85..987d47e 100644 --- a/packages/gsl/src/Numeric/GSL/ODE.hs +++ b/packages/gsl/src/Numeric/GSL/ODE.hs | |||
@@ -152,6 +152,7 @@ odeSolveVWith' method mbjac control epsAbs epsRel aX aX' mbsc h f xiv ts = | |||
152 | // sc' // xiv' // ts' ) | 152 | // sc' // xiv' // ts' ) |
153 | "ode" | 153 | "ode" |
154 | freeHaskellFunPtr fp | 154 | freeHaskellFunPtr fp |
155 | if (jp /= nullFunPtr) then freeHaskellFunPtr jp else pure () | ||
155 | return sol | 156 | return sol |
156 | 157 | ||
157 | foreign import ccall safe "ode" | 158 | foreign import ccall safe "ode" |