Skip to content

Commit

Permalink
free fmu in destructor
Browse files Browse the repository at this point in the history
  • Loading branch information
vwaurich committed Nov 10, 2016
1 parent 90c956c commit 581db7c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions OMEdit/OMEditGUI/Animation/FMUWrapper.cpp
Expand Up @@ -138,6 +138,9 @@ FMUWrapper_ME_1::~FMUWrapper_ME_1()
delete (mFMUdata._eventIndicators);
if (mFMUdata._eventIndicatorsPrev)
delete (mFMUdata._eventIndicatorsPrev);

fmi1_import_destroy_dllfmu(mpFMU);
fmi1_import_free(mpFMU);
}

void FMUWrapper_ME_1::fmi_get_real(unsigned int* valueRef, double* res)
Expand Down Expand Up @@ -332,6 +335,9 @@ FMUWrapper_ME_2::~FMUWrapper_ME_2()
delete (mFMUdata._eventIndicators);
if (mFMUdata._eventIndicatorsPrev)
delete (mFMUdata._eventIndicatorsPrev);

fmi2_import_destroy_dllfmu(mpFMU);
fmi2_import_free(mpFMU);
}

void FMUWrapper_ME_2::fmi_get_real(unsigned int* valueRef, double* res)
Expand Down

0 comments on commit 581db7c

Please sign in to comment.