Godyvdb below is making an incorrect assumption, which may confuse.
When you call a query, you are returned a handle, which points to a set of results and the associated variables for it. When you call free_result with that handle it will do a garbage - collection upon the result and associated variables, freeing up the memory.
What it WON'T do, and this is what Godyvdb is assuming, is optimise memory space by freeing all memory taken up by similar queries. In his example
$myhandle=mysql_query("....");
mysql_free_result(mysql_query("...."));
all he does is makes another query to the database, generates a new handle, then immediately frees up the space allocated to the result.
If you wish to free up memory, then you can only do so by quoting the correct handle. You cannot generate a new handle to an existing query by the use of mysql_query.
eg.
$myhandle = mysql_query("....");
$anotherhandle =mysql_query("....");
mysql_free_result($myhandle);
$anotherhandle will still point to an existing set of results, whilst $myhandle won't. The two handles are not related.