# mco_runtime_stop
RT

> Stop the database runtime.

### Prototype

        MCO_RET mco_runtime_stop(void)

### Arguments

void | No arguments

### Description

> This function terminates the eXtremeDB runtime and releases all resources initialized by `mco_runtime_start()`. In multi-threaded applications with multiple database connections, or multi-process applications using shared memory, care must be taken to not call `mco_runtime_stop()` more than once as this can lead to a race condition.

### Return Codes

MCO_S_OK | The database runtime was terminated

### Example

        Application snippet:

        int main(int argc, char* argv[])
        {
            ...
            rc = mco_db_close("MyDb");

            ...

            rc = mco_runtime_stop();

            ...
        }

### Files

Header file:
mco.h
Source file:
mcortmt.c
Library:
libmcolib.a