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

Dispose IDisposables in RegexGenerator #103142

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

omajid
Copy link
Member

@omajid omajid commented Jun 6, 2024

The StringWriter and IndentedTextWriter are IDisposable classes, so we should dispose them when we are done with them.

The StringWriter and IndentedTextWriter are IDisposable classes, so we
should dispose them when we are done with them.
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Jun 6, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions
See info in area-owners.md if you want to be subscribed.

Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

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

Thanks. This doesn't hurt anything, but fwiw it doesn't really help anything, either: these Dispose's are nops.

@omajid
Copy link
Member Author

omajid commented Jun 6, 2024

Agreed. I am doing some static analysis using some tools and a tool is flagging these uses. Would you prefer to leave this out?

@stephentoub
Copy link
Member

Agreed. I am doing some static analysis using some tools and a tool is flagging these uses. Would you prefer to leave this out?

No, it's fine. Like I said, it won't hurt :)

@stephentoub stephentoub merged commit 592ccdd into dotnet:main Jun 13, 2024
83 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Text.RegularExpressions community-contribution Indicates that the PR has been added by a community member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants