You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FMI specifies that when fmiFatal is returned from a function, "the slave is irreparably corrupted. [...] It is not possible to call any other function of the slave." (FMI for Co-simulation 1.0, Sec 3.1.2; emphasis mine. FMI 2.0 has a similar phrasing.).
In other words, after a function has returned fmiFatal, fmiFreeInstance() will never be called, which for CPPFMU means we have a memory leak.
In C++, destructors should always be safe to run, so I think the correct solution is to call fmiFreeInstance() from all FatalError handlers.
The text was updated successfully, but these errors were encountered:
FMI specifies that when
fmiFatal
is returned from a function, "the slave is irreparably corrupted. [...] It is not possible to call any other function of the slave." (FMI for Co-simulation 1.0, Sec 3.1.2; emphasis mine. FMI 2.0 has a similar phrasing.).In other words, after a function has returned
fmiFatal
,fmiFreeInstance()
will never be called, which for CPPFMU means we have a memory leak.In C++, destructors should always be safe to run, so I think the correct solution is to call
fmiFreeInstance()
from allFatalError
handlers.The text was updated successfully, but these errors were encountered: