FMIL.unloadFMU_() should make a call to fmiTerminate() before releasing the DLL.
FMIL.unloadFMU_()
fmiTerminate()