Memory usage of variables in Functions/Methods

From: Date: Wed, 08 Oct 2003 02:44:46 +0000
Subject: Memory usage of variables in Functions/Methods
Groups: php.general 
Request: Send a blank email to php-general+get-165379@lists.php.net to get a copy of this message
The question is what happens to local variables when the code leaves a function/method as far as memory is concerned. Does it *silently* unset (free the allocated memory) the local variables, or does it make sense to hardcode unset() to garbage these local variables? Thanks function foo() { $bar = 'some large value'; unset($bar); } --------- function foo() { $bar = 'some large value'; }

« previous php.general (#165379) next »