This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.


Free all resources allocated by MATLAB Runtime instance associated with library


void libraryTerminate(void) 


This function should be called after you finish calling the functions in this generated library, but before mclTerminateApplication is called.


Call libmatrixInitialize to initialize libmatrix library properly near the start of your program:

/* Call the library initialization routine and ensure the
*  library was initialized properly. */
if (!libmatrixInitialize())
            "An error occurred while initializing: \n %s ",
    return -2;

Near the end of your program (but before calling mclTerminateApplication) free resources allocated by the MATLAB® Runtime instance associated with library libmatrix:

/* Call the library termination routine */
/* Free the memory created */
mxDestroyArray(in1); in1=0;
mxDestroyArray(in2); in2 = 0;

Introduced in R2015a

Was this topic helpful?