Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Dispose IDisosables in HtmlTransformer - #5099

#5099
Merged
nohwnd merged 1 commit into
microsoft:mainmicrosoft/vstest:mainfrom
omajid:htmltransformer-close-manifest-xmlreader-resouce-streamomajid/dotnet-vstest:htmltransformer-close-manifest-xmlreader-resouce-streamCopy head branch name to clipboard
Jul 8, 2024
Merged

Dispose IDisosables in HtmlTransformer#5099
nohwnd merged 1 commit into
microsoft:mainmicrosoft/vstest:mainfrom
omajid:htmltransformer-close-manifest-xmlreader-resouce-streamomajid/dotnet-vstest:htmltransformer-close-manifest-xmlreader-resouce-streamCopy head branch name to clipboard

Conversation

@omajid

@omajid omajid commented Jun 14, 2024

Copy link
Copy Markdown
Contributor

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

nohwnd commented Jun 17, 2024

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@nohwnd
nohwnd merged commit e12f577 into microsoft:main Jul 8, 2024
@potnoddle

Copy link
Copy Markdown

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

This was referenced Jul 21, 2025
This was referenced Jul 23, 2026
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.