Posted by cmills28 on 07/05/06 00:23
I'm using php 4.3, and I"m wondering when is it a good idea to use this
unset() function to free a variable?
Also, what happens internally when a variable is set in one place, then
reset in another -- for instance:
$a = "some string";
and later on in the script I have:
$a = "a different string";
What happens to "some string" -- is it still floating around in memory
(without any references to it)? Or is it garbage collected & memory
freed? Should I use unset($a) to free "some string" before resetting
$a to something different?
Thanks.
Chris
Navigation:
[Reply to this message]
|