dotnet / command-line-api

Command line parsing, invocation, and rendering of terminal output.
https://github.com/dotnet/command-line-api/wiki
MIT License
3.38k stars 380 forks source link

Dispose StreamReader reading from disk in XmlDocReader #2441

Open omajid opened 3 months ago

omajid commented 3 months ago

We create a StreamReader via File.OpenText, but never Dispose() it. Wrap it in a using statement to automatically Dispose() it when TryLoad(TextReader, ...) is done using it.