The LMX_AtExit function registers functions that are to be called at program termination.
...
LMX_AtExit is used to register cleanup functions that access LMX API.
Note:Please note that using Calling static object destructors that interact with LM-X API, for example cstdlib's atexit(), WinApi's_onexit(), static
* objects' destructors, etc. that interact with LM-X API is not supported, and will have undefined behavior.
* and results in undefined behavior.