-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Dispose IDisposables in RegexGenerator #103142
Conversation
The StringWriter and IndentedTextWriter are IDisposable classes, so we should dispose them when we are done with them.
Tagging subscribers to this area: @dotnet/area-system-text-regularexpressions |
There was a problem hiding this 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.
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 :) |
src/libraries/System.Text.RegularExpressions/gen/RegexGenerator.cs
Outdated
Show resolved
Hide resolved
…r.cs Co-authored-by: Günther Foidl <[email protected]>
The StringWriter and IndentedTextWriter are IDisposable classes, so we should dispose them when we are done with them.