Skip to content

Commit

Permalink
Small fix for memory issues in CVode
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@23556 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
nimen committed Nov 25, 2014
1 parent 47134f3 commit 31f0529
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions SimulationRuntime/cpp/Solver/CVode/CVode.cpp
Expand Up @@ -28,7 +28,12 @@ Cvode::Cvode(IMixedSystem* system, ISolverSettings* settings)
_mixed_system(NULL),
_time_system(NULL),
_delta(NULL),
_ysave(NULL)
_ysave(NULL),
_sparsePattern_leadindex (NULL),
_sparsePattern_colorCols (NULL),
_sparsePattern_index (NULL)


{
_data = ((void*) this);

Expand Down Expand Up @@ -65,7 +70,7 @@ Cvode::~Cvode()
}


if (_sparsePattern_index)
if (_sparsePattern_leadindex)
delete [] _sparsePattern_leadindex;
if (_sparsePattern_colorCols)
delete [] _sparsePattern_colorCols;
Expand Down

0 comments on commit 31f0529

Please sign in to comment.