External Interfaces/API Reference Previous page   Next Page
mexMakeMemoryPersistent

Make memory allocated by MATLAB memory allocation routines (mxCalloc, mxMalloc, mxRealloc) persist after the 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

Learn more about the latest releases of MathWorks products:

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