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 IDisosables in HtmlTransformer #5099

Conversation

omajid
Copy link
Contributor

@omajid omajid commented Jun 14, 2024

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?

  • I have ensured that there is a previously discussed and approved issue.

There's two IDisposables being used in HtmlTransformer. We should
Dispose() both of them.
@nohwnd
Copy link
Member

nohwnd commented Jun 17, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@nohwnd nohwnd merged commit e12f577 into microsoft:main Jul 8, 2024
7 checks passed
@potnoddle
Copy link

Can I find this extension on nuget? I can see Microsoft.TestPlatform.Extensions.TrxLogger, but I heed the HtmlLogger so I can override functionality to attachments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants