Free dynamic memory allocated by MXCREATE* functions
#include "matrix.h" void mxDestroyArray(mxArray *pm);
mxDestroyArray
deallocates memory for the specified
mxArray
including:
Characteristics fields of the mxArray
, such as size
(m
and n
) and type
Associated data arrays, such as
ir
and jc
for sparse arrays
Fields of structure arrays
Cells of cell arrays
Do not call mxDestroyArray
on an mxArray
:
Returned in a left-side argument of a MEX file
Returned by the mxGetField
or
mxGetFieldByNumber
functions
Returned by the mxGetCell
function
See these examples in
:matlabroot
/extern/examples/refbook
See these examples in
:matlabroot
/extern/examples/mex
See these examples in
:matlabroot
/extern/examples/mx
mexMakeArrayPersistent
| mexMakeMemoryPersistent
| mxCalloc
| mxFree
| mxMalloc