External Interfaces Reference Previous page   Next Page
mexMakeMemoryPersistent

Make allocated memory MATLAB persist after MEX-function completes

C Syntax

Arguments

ptr
   Pointer to the beginning of memory allocated by one of the MATLAB memory allocation routines.

Description

By default, memory allocated by MATLAB is nonpersistent, so it is freed automatically when the MEX-file finishes. If you want the memory to persist, you must call mexMakeMemoryPersistent.

See Also

mexAtExit, mexLock, mexMakeArrayPersistent, mxCalloc, mxFree, mxMalloc, mxRealloc


Previous page  mexMakeArrayPersistent mexPrintf Next page

© 1994-2005 The MathWorks, Inc.