User`s guide

External Interfaces/API
17-39
Microsoft Windows 64-bit and 32-bit Platforms
Microsoft Visual Studio 2008 Express Edition
Compiler Support to Be Phased Out
The following compilers are supported in Version 7.7 (R2008b), but will not be supported
in a future version of MATLAB.
Windows (32-bit) platform
Intel Visual Fortran Version 9.1
Microsoft Visual Studio .NET Version 7.1
Open Watcom Version 1.3
Windows (64-bit) platforms
Intel Visual Fortran Version 9.1
Solaris SPARC (64-bit) platform
Sun Studio 11 cc / CC Version 5.8
Sun Studio 11 f90 Version 8.2
Use mxDestroyArray to Release Memory for mxArray
The documentation for the mxSetCell, mxSetField, and mxSetFieldByNumber
functions in the MATLAB C and Fortran API incorrectly instructs customers to use
mxFree to release memory for any mxArray returned by mxGetCell, mxGetField, or
mxGetFieldByNumber.
Compatibility Considerations
The correct function to use to release memory for an mxArray is mxDestroyArray.
Calling mxFree on an mxArray only frees the array header, but does not actually free
the data itself and can result in a memory leak.
To help diagnose this problem, MATLAB issues a warning if calling mxFree on an
mxArray could cause memory corruption. In future versions of MATLAB, this condition
might result in a segmentation violation.