This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mexUnlock (C and Fortran)

Allow clearing MEX-file from memory

C Syntax

#include "mex.h"
void mexUnlock(void);

Fortran Syntax

#include "fintrf.h"
subroutine mexUnlock()


By default, MEX-files are unlocked, meaning you can clear them at any time. Calling mexLock locks a MEX-file so that you cannot clear it from memory. Call mexUnlock to remove the lock.

mexLock increments a lock count. If you called mexLock n times, call mexUnlock n times to unlock your MEX-file.


See the following examples in matlabroot/extern/examples/mex.

Was this topic helpful?