Dispose XmlReaders in System.Xml.Xpath.XPathNavigator#103294
Closed
omajid wants to merge 1 commit intodotnet:mainfrom
Closed
Dispose XmlReaders in System.Xml.Xpath.XPathNavigator#103294omajid wants to merge 1 commit intodotnet:mainfrom
omajid wants to merge 1 commit intodotnet:mainfrom
Conversation
Contributor
|
Tagging subscribers to this area: @dotnet/area-system-xml |
This code creates a number of XmlReader through various method calls. They are not disposed. Since they are IDisposables, the code should dispose them.
a7a68ad to
619962a
Compare
omajid
commented
Jun 11, 2024
This was referenced Jun 11, 2024
Open
stephentoub
reviewed
Jun 13, 2024
| ArgumentNullException.ThrowIfNull(newSibling); | ||
|
|
||
| XmlWriter writer = InsertAfter(); | ||
| using XmlWriter writer = InsertAfter(); |
Member
There was a problem hiding this comment.
Are any of these changes actually improving things? It's possible they could lead to performance regressions, as these are mostly methods that could otherwise be inlined (in particular with dynamic PGO), and now with the exception handling they likely won't be. I'd prefer to close this PR unless it's actually solving a real run-time problem.
Member
Author
There was a problem hiding this comment.
Are any of these changes actually improving things?
I have no data to make that claim.
I'd prefer to close this PR unless it's actually solving a real run-time problem.
Fair enough!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This code creates a number of XmlReader through various method calls. They are not disposed. Since they are IDisposables, the code should dispose them.