[php-src] Issue #7958: `LimitIterator` is not GCable
| From: | mvorisek | Date: | Fri, 04 Feb 2022 10:20:32 +0000 |
| Subject: | [php-src] Issue #7958: `LimitIterator` is not GCable | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-239474@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/7958
Comment Author: mvorisek
> It's caused by the reference to
$this from the
> CallbackFilterIterator closure. Making the closure
> static solves the issue. It only happens for nested
> CallbackFilterIterator iterators.
Yes, it seems ref count is not properly decremented during GC cycle when
CallbackFilterIterator is nested - https://3v4l.org/mNt0C/rfc#vgit.master
Can you please mark this issue as verified and do you think it can be fixed in PHP v8.0 or at least
v8.1?