Bug #74640 [Opn]: Generators can leak memory

From: Date: Sat, 12 Aug 2017 00:15:05 +0000
Subject: Bug #74640 [Opn]: Generators can leak memory
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-210621@lists.php.net to get a copy of this message
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)

« previous php.bugs (#210621) next »