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

Call Dispose on enumerator (#1285) #1286

Merged
merged 1 commit into from Sep 6, 2022
Merged

Conversation

jm-merle
Copy link
Contributor

@jm-merle jm-merle commented Sep 6, 2022

See discussion #1285 : call dispose on enumerator (or execute finally clause on enumerator methods/properties)

  • Added a call to (_enumerator as IDisposable)?.Dispose() in EnumerableIterator.Close
  • Added 3 test cases : normal termination, on break, on exception

Copy link
Collaborator

@lahma lahma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

@lahma lahma merged commit aa614e1 into sebastienros:main Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants