mysql\_thread\_end(3) MariaDB Connector/C mysql\_thread\_end(3)

## [Name](#Name)

mysql\_thread\_end - Releases thread specific memory

## [Synopsis](#Synopsis)

```
#include <mysql.h>
void mysql_thread_end(void );
    
```

## [Description](#Description)

The mysql\_thread\_end() function needs to be called before a client thread ends. It will release thread specific memory, which was allocated by a previous [**mysql\_thread\_init(3)**](/man/enterprise-packages/mariadb-12.2/mysql_thread_init.3) call. Returns void.

## [Notes](#Notes)

Unlike [**mysql\_thread\_init(3)**](/man/enterprise-packages/mariadb-12.2/mysql_thread_init.3) mysql\_thread\_end() will not be invoked automatically if the thread ends. To avoid memory leaks mysql\_thread\_end() must be called explicitly.

## [History](#History)

This function is deprecated since MariaDB Connector/C 3.0.0.

## [See also](#See_also)

•

[**mysql\_thread\_init(3)**](/man/enterprise-packages/mariadb-12.2/mysql_thread_init.3)

•

[**mysql\_thread\_safe(3)**](/man/enterprise-packages/mariadb-12.2/mysql_thread_safe.3)

Version 3.4

---

Document: mysql_thread_end(3) from mariadb-12.2 12.2.2-r10 (Chainguard OS)
Source: https://github.com/MariaDB/server.git
