Documentation Home
MySQL 5.5 Reference Manual
Related Documentation Download this Manual Excerpts from this Manual mysql_thread_end()

void mysql_thread_end(void)


This function needs to be called before calling pthread_exit() to free memory allocated by mysql_thread_init().

mysql_thread_end() is not invoked automatically by the client library. It must be called explicitly to avoid a memory leak.

Return Values


Download this Manual
User Comments
  Posted by Armin Schöffmann on March 6, 2005
According to dll.c:
Within win32, LibMain calls mysql_thread_init() and mysql_thread_end() automatically for each newly created thread after the lib has been loaded.
Therefor it shouldn't be necessary to call these functions again. As I said, only for win32 and only if we use the dynamic library.
Sign Up Login You must be logged in to post a comment.