> For the complete documentation index, see [llms.txt](https://docs.9proxy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.9proxy.com/developers/sdk/sdk-native-c/functions/safeexit.md).

# SafeExit

Perform a safe shutdown of the SDK when closing the application. Recommended sequence: call CloseTokenChan(), then StopHttpApi(), then StopComunicate(), and finally SafeExit().

```c
void SafeExit()
```

***

## Parameters

* none

## Return Value

Perform a safe shutdown of the SDK when closing the application

## Example

```c
// example

void Shutdown() { 
    CloseTokenChan();
    StopHttpApi();
    StopComunicate();
    SafeExit();
}

```
