MATLAB Application Program Interface Reference Help Desk

mexMakeMemoryPersistent

Purpose

Make a section of dynamic memory allocated by mxCalloc persist after the MEX-file completes

C Syntax

Arguments

ptr

Pointer to the beginning of any memory parcel allocated by mxCalloc.

Description

By default, memory allocated by mxCalloc is nonpersistent. That is, MATLAB's memory management facility automatically frees such memory when the MEX-file finishes. Calling mexMakeMemoryPersistent tells MATLAB not to free such memory when the MEX-file finishes. In other words, the memory allocated by mxCalloc becomes persistent.

See Also

mexLock, mexMakeArrayPersistent, mxCalloc



[ Previous | Help Desk | Next ]