Unload shared C library from memory
unloadlibrary libname
example
unloadlibrary libname unloads library libname from memory.
libname
collapse all
Add the shrlib examples folder to the path.
shrlib
addpath(fullfile(matlabroot,'extern','examples','shrlib'))
Load the library, if it is not already loaded.
if ~libisloaded('shrlibsample') loadlibrary('shrlibsample') end
When finished, unload the library to free memory.
unloadlibrary shrlibsample
Name of shared library, specified as a character vector. Do not include the path or file extension in libname.
If you call loadlibrary using the alias option, then you must use the alias name for the libname argument.
loadlibrary
alias
Data Types: char
char
Use with libraries that are loaded using the loadlibrary function.
To unload a MEX file, use the clear function.
clear
clear | libisloaded | loadlibrary
libisloaded
You have a modified version of this example. Do you want to open this example with your edits?