External Interfaces/API Reference    
mexMakeMemoryPersistent

Make memory allocated by MATLAB memory allocation routines (mxCalloc, mxMalloc, mxRealloc) persist after the MEX-file completes

Fortran 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


  mexMakeArrayPersistent mexPrintf