Close MATLAB Runtime-internal application state
bool mclTerminateApplication(void)
Call this function once at the end of your program to close MATLAB® Runtime-internal application state. Call only once per process. After you have called this function, you cannot call any further MATLAB Compiler SDK™-generated functions or any functions in any MATLAB library.
Caution
|
Caution
|
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;