Bug #60218 [Ana]: instantiating new class leads to memory leak in cli
| From: | dsp@php.net | Date: | Sat, 12 Nov 2011 16:49:38 +0000 |
| Subject: | Bug #60218 [Ana]: instantiating new class leads to memory leak in cli | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-165089@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60218&edit=1
ID: 60218
Updated by: dsp@php.net
Reported by: yohgaki at ohgaki dot net
-Summary: dir() is missing
+Summary: instantiating new class leads to memory leak in cli
Status: Analyzed
Type: Bug
Package: Unknown/Other Function
Operating System: Linux x86_64
PHP Version: 5.4SVN-2011-11-04 (SVN)
Block user comment: N
Private report: N
New Comment:
updated the title
Previous Comments:
------------------------------------------------------------------------
[2011-11-12 16:40:48] dsp@php.net
The following patch has been added/updated:
Patch Name: ensure-efree-of-oparray
Revision: 1321116048
URL: https://bugs.php.net/patch-display.php?bug=60218&patch=ensure-efree-of-oparray&revision=1321116048
------------------------------------------------------------------------
[2011-11-12 16:39:04] dsp@php.net
The following patch has been added/updated:
Patch Name: 60218-try-catch-efree-op-array
Revision: 1321115944
URL: https://bugs.php.net/patch-display.php?bug=60218&patch=60218-try-catch-efree-op-array&revision=1321115944
------------------------------------------------------------------------
[2011-11-12 16:38:41] dsp@php.net
I added a patch that fixes it for me
------------------------------------------------------------------------
[2011-11-05 00:32:16] yohgaki at ohgaki dot net
> 1. The documentation examples don't use 'new'. This works:
> php -r '$o = dir(".");'
It should always raise error for it, I suppose.
Strange thing is 'It works' sometimes.
If leak and other problem(works for sometimes) are specific to dir(), I think
dropping dir() is an option.
------------------------------------------------------------------------
[2011-11-04 18:08:58] sixd@php.net
1. The documentation examples don't use 'new'. This works:
php -r '$o = dir(".");'
2. SPL might have better alternatives, e.g.:
http://www.php.net/manual/en/class.recursivedirectoryiterator.php
3. I'll leave the bug open to track the memleak
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=60218
--
Edit this bug report at https://bugs.php.net/bug.php?id=60218&edit=1