On 11/29/2011 7:56 AM, Tim Streater wrote:
> Is there any benefit to setting a pointer to a class instance to null before 
> returning from a function? As in:
> 
> function myfunc ()
>      {
>      $p = new myclass ();
>      // do stuff
>      $p = null;
>      }
> 
> Thanks.
> 
> --
> Cheers  --  Tim
> 
> 

Nope, AFAIK everything inside the function will disappear when the function
exits.  Unless you run into one of the memory release issues talked about in the
past, in that case you might be SOL.

-- 
Jim Lucas

http://www.cmsws.com/
http://www.cmsws.com/examples/
http://www.bendsource.com/

C - (541) 408-5189
O - (541) 323-9113
H - (541) 323-4219

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to