|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-05-26 19:01 UTC] nlopess@php.net
[2006-06-03 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 22 06:00:01 2025 UTC |
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 **//