mysql_thread_end() ends the use of a thread handle.
Syntax
void
mysql_thread_end(void)
Return values
None.
Notes
Before you call pthread_exit(), you can call this function to release the memory allocated by mysql_thread_init().
You must explicitly call mysql_thread_end() to avoid a memory leakage because the client library does not automatically call it.