Free dynamic memory allocated by MXCREATE* functions
mxDestroyArray deallocates the memory occupied by the specified mxArray. This includes:
Characteristics fields of the mxArray, such as size, (m and n), and type.
Associated data arrays, such as pr and pi for complex arrays, and ir and jc for sparse arrays.
Fields of structure arrays.
Cells of cell arrays.
Do not call mxDestroyArray on an mxArray:
you return in a left-side argument of a MEX-file.
returned by the mxGetField or mxGetFieldByNumber functions.
returned by the mxGetCell function.
See the following examples in matlabroot/extern/examples/refbook.
See the following examples in matlabroot/extern/examples/mex.
See the following examples in matlabroot/extern/examples/mx.