ID: 37596 Updated by: [EMAIL PROTECTED] Reported By: jlevy at imerica dot com -Status: Open +Status: Feedback Bug Type: Unknown/Other Function Operating System: Debian GNU/Linux PHP Version: 5.1.4 New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://snaps.php.net/win32/php5.2-win32-latest.zip Previous Comments: ------------------------------------------------------------------------ [2006-05-26 00:29:30] jlevy at imerica dot com Description: ------------ sha1_file() not releasing memory. After calling thousands of sha1_file() I noticed that memory resources are not being freed. Script evenually bombs due to lack of resources. ** Note ** I think md5_file() is doing the same thing. Reproduce code: --------------- function getFiles(&$rdi,$depth=0) { if (!is_object($rdi)) return; for ($rdi->rewind();$rdi->valid();$rdi->next()) { if ($rdi->isDot()) continue; if ($rdi->isDir() || $rdi->isFile()) { if($rdi->isFile() echo sha1_file($rdi->current()); if ($rdi->hasChildren()) getFiles($rdi->getChildren(),1+$depth); } } } //** I figured that calling clearstatcache() might help, but no, it didn't **// ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=37596&edit=1