Skip to Main Content Skip to Search
Product Documentation

mclTerminateApplication - Close down all MCR-internal application state

Synopsis

bool mclTerminateApplication(void)

Description

Call this function once at the end of your program to close down all MCR-internal application state. Call only once per process. After you have called this function, you cannot call any further MATLAB Compiler-generated functions or any functions in any MATLAB library.

Examples

At the start of your program, call mclInitializeApplication to ensure your library was properly initialized:

mclInitializeApplication(NULL,0);
if (!libmatrixInitialize()){
    fprintf(stderr, 
            "An error occurred while initializing: \n %s ",
            mclGetLastErrorMessage());
    return -1;
}

At your program's exit point, call mclTerminateApplication to properly shut the application down:

mxDestroyArray(in1); in1=0;
mxDestroyArray(in2); in2 = 0;
mclTerminateApplication();
return 0;

See Also

mclInitializeApplication

How To

  


Free MATLAB Compiler Interactive Kit

Learn how to build standalone executables and C/C++ shared libraries from MATLAB code.


Get free kit

Trials Available

Try the latest version of MATLAB Compiler.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS