Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace generators with IteratorIterator in custom iterators #2105

Closed
alcaeus opened this issue Nov 11, 2019 · 4 comments
Closed

Replace generators with IteratorIterator in custom iterators #2105

alcaeus opened this issue Nov 11, 2019 · 4 comments

Comments

@alcaeus
Copy link
Member

alcaeus commented Nov 11, 2019

Feature Request

Q A
New Feature improvement
RFC no
BC Break no

Summary

The HydratingIterator and CachingIterator classes use generators to wrap the given traversable. As described in #2092 and fixed in #2100, this can leak memory if the iterator class is destroyed while the generator isn't exhausted completely.

IteratorIterator can be used instead, but since there are some changes to generators with respect to rewind, the change shouldn't be done in a patch release.

@soyuka
Copy link
Contributor

soyuka commented Dec 18, 2024

What's the status on this @alcaeus ?

@alcaeus
Copy link
Member Author

alcaeus commented Dec 18, 2024

The status is the same as five years ago, except that I have no recollection of what the issue was 🤦‍♂️

Did you encounter an issue around iterators that needs addressing?

@soyuka
Copy link
Contributor

soyuka commented Dec 18, 2024

I think we should close this, I'll open a new one if I can reproduce!

@alcaeus alcaeus closed this as not planned Won't fix, can't repro, duplicate, stale Dec 18, 2024
@alcaeus
Copy link
Member Author

alcaeus commented Dec 18, 2024

No complaints from me 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants