microsoft / vstest

Visual Studio Test Platform is the runner and engine that powers test explorer and vstest.console.
MIT License
870 stars 316 forks source link

Dispose IDisosables in HtmlTransformer #5099

Open omajid opened 2 weeks ago

omajid commented 2 weeks ago

Description

There's two IDisposables being used in HtmlTransformer (a Stream and an XmlReader). We should Dispose() both of them.

I think this is mostly a hygiene issue. Assembly.GetManifestResourceStream() allocates memory only, not an some non-memory resource that has to be Dispose()d correctly. Same thing for XmlReader too. So I don't think not disposing these has any real impact.

This was flagged by a static analysis too.

Related issue

Kindly link any related issues. E.g. Fixes #xyz. -- Shall I file one?

nohwnd commented 1 week ago

/azp run

azure-pipelines[bot] commented 1 week ago
Azure Pipelines successfully started running 1 pipeline(s).