Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

mexMakeArrayPersistent (C and Fortran) - Make mxArray persist after MEX-file completes

C Syntax

#include "mex.h"
void mexMakeArrayPersistent(mxArray *pm);

Fortran Syntax

mexMakeArrayPersistent(pm)
mwPointer pm

Arguments

pm

Pointer to an mxArray created by an mxCreate* function

Description

By default, an mxArrayallocated by an mxCreate* function is not persistent. The MATLAB memory management facility automatically frees a nonpersistent mxArray when the MEX-function finishes. If you want the mxArray to persist through multiple invocations of the MEX-function, you must call the mexMakeArrayPersistent function.

See Also

mexAtExit, mxDestroyArray, mexLock, mexMakeMemoryPersistent, and the mxCreate* functions

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS