Free dynamic memory allocated by MXCREATE* functions
#include "matrix.h" void mxDestroyArray(mxArray *pm);
subroutine mxDestroyArray(pm) mwPointer pm
pm
Pointer to the mxArray
to free
mxDestroyArray
deallocates the memory occupied
by the specified mxArray
including:
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
:
returned 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
.