Bug #74640 [Opn->Csd]: Generators can leak memory

From: Date: Mon, 16 Oct 2017 06:28:08 +0000
Subject: Bug #74640 [Opn->Csd]: Generators can leak memory
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211710@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
 User updated by:    g dot aivaras at gmail dot com
 Reported by:        g dot aivaras at gmail dot com
 Summary:            Generators can leak memory
-Status:             Open
+Status:             Closed
 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:

Not a bug, after looking over with fresh mind I saw that this is code issue.


Previous Comments:
------------------------------------------------------------------------
[2017-08-12 00:15:03] ajf@php.net

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”?

------------------------------------------------------------------------
[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 (#211710) next »