PHP 4.0 Bug #6333 Updated: garbage collection is not being performed on create_function?

From: Date: Thu, 07 Sep 2000 15:43:23 +0000
Subject: PHP 4.0 Bug #6333 Updated: garbage collection is not being performed on create_function?
Groups: php.dev 
Request: Send a blank email to php-dev+get-32565@lists.php.net to get a copy of this message
ID: 6333 Updated by: andi Reported By: ewdafa@ewdafa.b0rk.co.uk Status: Closed Bug Type: Performance problem Assigned To: Comments: This isn't a bug but how it works. Each create_function() call creates a new unique function. So obviously if you define zillions in an infinite loop you'll run out of memory. Previous Comments: [2000-08-24 09:57:38] ewdafa@ewdafa.b0rk.co.uk the following code causes PHP to continually eat more and more memory where it should be destroying the old reference for $func. while(1) { $array = array(); $func = create_function('', "return 0;"); $array[] = $func; $func = 0; echo "sleeping for a second.n"; sleep(1); } --------------------------------------------------------------------------- Full Bug description available at: http://bugs.php.net/?id=6333

« previous php.dev (#32565) next »