PHP will indeed take care of freeing the result set and closing the connection. However, if you happen to be using a more complex script with lot's of queries and lot's of connections then it might be a good idea to free them up as the script is running to avoid running out of resources during executation.