After all the calls from your application to the ILOG CPLEX Callable Library are complete, you must release the ILOG CPLEX environment by calling the routine CPXcloseCPLEX(). This routine tells ILOG CPLEX that:
CPXcloseCPLEX()