mexLock (C and Fortran) - Prevent MEX-file from being cleared from memory
C Syntax
#include "mex.h"
void mexLock(void);
Fortran Syntax
mexLock()
Description
By default, MEX-files are unlocked, meaning that a user can
clear them at any time. Call mexLock to prohibit
a MEX-file from being cleared.
To unlock a MEX-file, you must call mexUnlock.
Do not use the munlock function.
mexLock increments a lock count. If you
call mexLock n times, you
must call mexUnlock n times
to unlock your MEX-file.
C Examples
See mexlock.c
in the matlabroot/extern/examples/mex folder
.
See Also
mexIsLocked, mexMakeArrayPersistent, mexMakeMemoryPersistent, mexUnlock
 | mexIsLocked (C and Fortran) | | mexMakeArrayPersistent (C and Fortran) |  |
Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
Get the Interactive Kit