Bug #74640 [Opn]: Generators can leak memory
Edit report at https://bugs.php.net/bug.php?id=74640&edit=1
ID: 74640
Updated by: ajf@php.net
Reported by: g dot aivaras at gmail dot com
Summary: Generators can leak memory
Status: Open
Type: Bug
Package: *General Issues
Operating System: MacOS 10.12.4
PHP Version: 7.1.5
Block user comment: N
Private report: N
New Comment:
This is quite a complicated test case. Does it need to be this many files?
Also, can you provide the âalmost same code in single fileâ?
Previous Comments:
------------------------------------------------------------------------
[2017-05-23 15:47:37] g dot aivaras at gmail dot com
Description:
------------
When iterating over generators sometimes yielded objects have extra references somewhere. I tried to
simplify the test case as much has possible but almost same code in single file did not had this
problem
Test script:
---------------
https://github.com/GrandLTU/GeneratorTest
Expected result:
----------------
$ php bin/test.php
Object created
Object created
Object destroyed
Object destroyed
int(0)
int(0)
Exit
Actual result:
--------------
$ php bin/test.php
Object created
Object created
int(2)
int(2)
Exit
Object destroyed
Object destroyed
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=74640&edit=1
Thread (3 messages)