Name
mysql_free_result( )
Synopsis
void mysql_free_result(MYSQL_RES *result)
Use this to free memory allocated by a
function such as mysql_store_result( )
in which a
MYSQL_RES
element was employed to store a results
set.
... result = mysql_query(mysql, sql_stmnt); ... mysql_free_result(result); ...
Not freeing allocated memory or attempting to access allocated memory after it’s freed can cause problems.
Get MySQL in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.