Using the C Math Library    

Explicit Memory Management 

In explicit memory management, you must assign the returned mxArray to an array variable before passing it to another function. You use the assignment operator (=) to assign the return value from a library function to an mxArray* variable or by passing an mxArray* variable (uninitialized or initialized to NULL) as an output argument to a library function.

In this memory management scheme:

See Example Without Automated Memory Management for an example of explicit memory management.


 Automated Versus Explicit Memory Management Automated Memory Management