By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,278 Members | 1,329 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,278 IT Pros & Developers. It's quick & easy.

mysql_free_result()

P: n/a

After the webserver executed a page.php (resulting with or without
error), are all $result from mysql_query() released automatically?

--
iTech Consulting Services Limited
Expert in ePOS (Point-Of-Sales) solutions
Website: http://www.itech.com.hk (IE only)
Tel: (852)2325 3883 Fax: (852)2325 8288
Apr 27 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Man-wai Chang wrote:
>
After the webserver executed a page.php (resulting with or without
error), are all $result from mysql_query() released automatically?
Google
Apr 27 '07 #2

P: n/a
Yes, when the script finishes executing. There is a memory leak somewhere
though in mysql_query() and using mysql_free_result() doesn't properly free
all the memory. Unless you are executing thousands of queries in a single
script this shouldn't be a problem. If it is, you can just increase the
available memory size for your script.
Memory leak? What about local variables?

This function reminds me of the RELEASE command in Foxpro. But then, I
never seen a need to use it as long as I declare the variables as LOCAL
or PRIVATE.

--
iTech Consulting Services Limited
Expert in ePOS (Point-Of-Sales) solutions
Website: http://www.itech.com.hk (IE only)
Tel: (852)2325 3883 Fax: (852)2325 8288
Apr 27 '07 #3

P: n/a
Google

So did you publish your findings and experiences on PHP? If no one
expert talked, what kind of answers could Google found?

--
iTech Consulting Services Limited
Expert in ePOS (Point-Of-Sales) solutions
Website: http://www.itech.com.hk (IE only)
Tel: (852)2325 3883 Fax: (852)2325 8288
Apr 27 '07 #4

P: n/a
Man-wai Chang wrote:
>Google

So did you publish your findings and experiences on PHP? If no one
expert talked, what kind of answers could Google found?
And you didn't think Google could read your mind, could you?

--
iTech Consulting Services Limited
Expert in ePOS (Point-Of-Sales) solutions
Website: http://www.itech.com.hk (IE only)
Tel: (852)2325 3883 Fax: (852)2325 8288
Apr 27 '07 #5

P: n/a
Man-wai Chang wrote:
>Google

So did you publish your findings and experiences on PHP? If no one
expert talked, what kind of answers could Google found?
So did you even try and find an answer there yourself? Suppose not.
Sh.
Apr 27 '07 #6

P: n/a
David Gillen wrote:
Man-wai Chang said:
>After the webserver executed a page.php (resulting with or without
error), are all $result from mysql_query() released automatically?
Yes, when the script finishes executing. There is a memory leak somewhere
though in mysql_query() and using mysql_free_result() doesn't properly free
all the memory. Unless you are executing thousands of queries in a single
script this shouldn't be a problem. If it is, you can just increase the
available memory size for your script.
Is that Bug #28424? I often wondered if he meant result or query.

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.
Apr 27 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.