mexAtExit
Register a function to be called when the MEX-file is cleared or when Nelson exits
📝Syntax
#include "mex.h"
int mexAtExit(void (*ExitFcn)(void));
📥Input Arguments
Parameter Description
ExitFcn Pointer to function you wish to run on exit.
📤Output Arguments
Parameter Description
returned value returns 0.
📄Description

Each MEX can register only one active exit subroutine at a time.

mexAtExit registers a subroutine to be called just when Nelson is finished or clear is called.

💡Examples
edit([modulepath('mex', 'tests'), '/test_mexAtExit.m'])
🔗See Also
exitclear
🕔Version History
Version Description
1.0.0 initial version
Edit this page on GitHub