NYCPHP Meetup

NYPHP.org

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

Brent Baisley brenttech at gmail.com
Fri Oct 12 16:36:59 EDT 2007


unset will free the memory from php's memory, mysql_free_result will
free the memory from the database's memory. mysql_free_result really
has little effect on php memory usage.

On 10/12/07, Brian D. <brian at realm3.com> wrote:
> 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
> >
> _______________________________________________
> 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