Documentation Home
MySQL 8.0 C API Developer Guide
Download this Manual
PDF (US Ltr) - 1.2Mb
PDF (A4) - 1.2Mb
HTML Download (TGZ) - 156.8Kb
HTML Download (Zip) - 188.0Kb

7.25 mysql_free_result()

void mysql_free_result(MYSQL_RES *result)



mysql_free_result() is a synchronous function. Its asynchronous counterpart is mysql_free_result_nonblocking(), for use by applications that require asynchronous communication with the server. See Chapter 12, C API Asynchronous Interface.

mysql_free_result() frees the memory allocated for a result set by mysql_store_result(), mysql_use_result(), mysql_list_dbs(), and so forth. When you are done with a result set, you must free the memory it uses by calling mysql_free_result().

Do not attempt to access a result set after freeing it.

Return Values