From 5c75c9aaee6ab9be1e85f9f98a9ee401c08b7501 Mon Sep 17 00:00:00 2001
From: george <george@ac1d8469-bf42-47a9-8791-bf33cf982152>
Date: Mon, 7 Dec 2009 12:48:18 +0000
Subject: [PATCH] removed more leaks in calcDerivatives

git-svn-id: https://www.dynare.org/svn/dynare/trunk@3204 ac1d8469-bf42-47a9-8791-bf33cf982152
---
 mex/sources/k_order_perturbation/k_ord_dynare.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mex/sources/k_order_perturbation/k_ord_dynare.cpp b/mex/sources/k_order_perturbation/k_ord_dynare.cpp
index 54bb972f57..10e34651cd 100644
--- a/mex/sources/k_order_perturbation/k_ord_dynare.cpp
+++ b/mex/sources/k_order_perturbation/k_ord_dynare.cpp
@@ -93,6 +93,8 @@ KordpDynare::~KordpDynare()
     delete dsnl;
   if (denl)
     delete denl;
+  if (JacobianIndices)
+      delete JacobianIndices;
 }
 
 /** This clears the container of model derivatives and initializes it
@@ -180,6 +182,7 @@ KordpDynare::calcDerivatives(const Vector &yy, const Vector &xx) throw (DynareEx
     populateDerivativesContainer(g3, 3, JacobianIndices);
     delete g3;
     }
+  delete llxYYp;
 }
 
 void
-- 
GitLab