[GIT-PULLS] [php-src] PR #23464: Fix leak when iterating IntlBreakIterator parts iterators

[email protected] (iliaal)
Newsgroups php.git-pulls
Message-ID <[email protected]>
Pull Request: https://github.com/php/php-src/pull/23464
Author: iliaal

Iterating IntlBreakIterator::getPartsIterator() leaked memory on every loop because the IntlPartsIterator held a counted self-reference through its embedded zend_object_iterator's wrapping_obj, so refcount destruction could never complete, and the retained current element was additionally never released at iterator destruction. zoi_with_current_dtor() now invalidates the current element and the parts iterator leaves wrapping_obj UNDEF as the plain BreakIterator iterator already does, making teardown deterministic; the string enumeration iterator keeps its self-reference because move_forward and rewind need the owner for error handling.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.