> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/connectors/mariadb-connector-c/api-functions/mysql_thread_end.md).

# mysql\_thread\_end

## Syntax

```c
void mysql_thread_end(void );
```

## Description

The `mysql_thread_end()` function is now an empty no-op, retained only for API/ABI compatibility.

## Return Value

Returns void.

{% hint style="info" %}
Unlike [mysql\_thread\_init()](/docs/connectors/mariadb-connector-c/api-functions/mysql_thread_init.md) `mysql_thread_end()` will not be invoked automatically if the thread ends. To avoid memory leaks `mysql_thread_end()` must be called explicitly.
{% endhint %}

{% hint style="warning" %}
This function has been deprecated since MariaDB Connector/C 3.0.0.
{% endhint %}

## See Also

* [mysql\_thread\_init()](/docs/connectors/mariadb-connector-c/api-functions/mysql_thread_init.md)
* [mysql\_thread\_safe()](/docs/connectors/mariadb-connector-c/api-functions/mysql_thread_safe.md)

{% @marketo/form formId="4316" %}
