• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Noobish question: Why unset a variable?

#9
[eluser]drewbee[/eluser]
Just to throw this in here since we are talking about freeing memory up,

The same can be said about queries. I generally tend to use mysql_free_result() after running a query if there are still many queries to be made on the same page, or if the query has a large result set and it will no longer be used.

Same as with variables though, PHP automatically cleans all of this up at the end of script execution.


If you have a long running script though, it is almost always a must.


Messages In This Thread
Noobish question: Why unset a variable? - by El Forum - 09-14-2008, 04:55 PM
Noobish question: Why unset a variable? - by El Forum - 09-14-2008, 05:16 PM
Noobish question: Why unset a variable? - by El Forum - 09-14-2008, 05:22 PM
Noobish question: Why unset a variable? - by El Forum - 09-14-2008, 10:00 PM
Noobish question: Why unset a variable? - by El Forum - 09-14-2008, 10:33 PM
Noobish question: Why unset a variable? - by El Forum - 09-15-2008, 04:24 AM
Noobish question: Why unset a variable? - by El Forum - 09-15-2008, 06:24 AM
Noobish question: Why unset a variable? - by El Forum - 09-15-2008, 06:25 AM
Noobish question: Why unset a variable? - by El Forum - 09-15-2008, 07:17 AM
Noobish question: Why unset a variable? - by El Forum - 09-15-2008, 04:32 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.