NYCPHP Meetup

NYPHP.org

[nycphp-talk] Releasing of memory used in results.

Brian D. brian at realm3.com
Fri Oct 12 15:59:55 EDT 2007


The difference, I think, lies in the fact that unset($result) unsets
the "value" for a variable, whereas mysql_free_result actually free's
the result identifier associated with $result (try echoing $result out
before freeing it to see what I mean).

Basically, mysql_free_result() is database aware, and unset() is not.

- B.

On 10/12/07, Anthony Wlodarski <aw at sap8.com> wrote:
>
>
>
>
> What is the difference between let us say: unset($result); and
> mysql_free_result($result);?
>
>
>
> I noticed that unset's documentation doesn't include any information about
> memory being returned.
>
>
>
> Anthony Wlodarski
>
> aw at sap8.com
>
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>



More information about the talk mailing list