Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/24/18 18:16:43 (6 years ago)
Author:
gkronber
Message:

#2925: fixed memory leak and fixed bug in determination of integration time span

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2925_AutoDiffForDynamicalModels/AutoDiffForDynamicalModelsTest/TestCvodes.cs

    r16248 r16253  
    172172
    173173      CVODES.N_VDestroy_Serial(y);
    174       CVODES.CVodeFree(cvode_mem);
     174      CVODES.CVodeFree(ref cvode_mem);
    175175      CVODES.SUNLinSolFree(linearSolver);
    176176      CVODES.SUNMatDestroy(A);
     
    188188      CVODES.NV_Set_Ith_S(y, 1, 1);  // v
    189189
    190       var cvode_mem = CVODES.CVodeCreate(CVODES.MultistepMethod.CV_ADAMS, CVODES.NonlinearSolverIteration.CV_FUNCTIONAL);
     190      var cvode_mem = CVODES.CVodeCreate(CVODES.MultistepMethod.CV_BDF, CVODES.NonlinearSolverIteration.CV_NEWTON);
    191191
    192192      var flag = CVODES.CVodeInit(cvode_mem, F, 0.0, y);
     
    264264
    265265      CVODES.N_VDestroy_Serial(y);
    266       CVODES.CVodeFree(cvode_mem);
     266      CVODES.CVodeFree(ref cvode_mem);
    267267      CVODES.SUNLinSolFree(linearSolver);
    268268      CVODES.SUNMatDestroy(A);
Note: See TracChangeset for help on using the changeset viewer.