Skip to content

Commit

Permalink
Remove memory errors
Browse files Browse the repository at this point in the history
  • Loading branch information
devyeshtandon committed Aug 17, 2016
1 parent b7a6a3f commit cf54aa2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mbdynFMI.cc
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,16 @@ fmu2::~fmu2(void){
delete[] eventIndicatorsPrev;

fmi2_import_free_instance(fmu);
fmi2_import_destroy_dllfmu(fmu);
fmi2_import_free(fmu);

} else {

fmistatus = fmi2_import_terminate(fmu);
STATUSCHECK(fmistatus);
fmi2_import_free_instance(fmu);
fmi2_import_destroy_dllfmu(fmu);
fmi2_import_free(fmu);

}

Expand Down

0 comments on commit cf54aa2

Please sign in to comment.