Skip to content

Fix IDisposable implementation in sealed classes#26215

Merged
jshigetomi merged 2 commits into
PowerShell:masterfrom
xtqqczze:sealed-dispose-p1
Mar 18, 2026
Merged

Fix IDisposable implementation in sealed classes#26215
jshigetomi merged 2 commits into
PowerShell:masterfrom
xtqqczze:sealed-dispose-p1

Conversation

@xtqqczze
Copy link
Copy Markdown
Contributor

@xtqqczze xtqqczze commented Oct 16, 2025

  • Do not invoke GC.SuppressFinalize for types without a finalizer.
  • Remove redundant void Dispose(bool disposing) method for sealed types.

Subset of #24719

Review with whitespace hidden.

@iSazonov iSazonov added the CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log label Oct 18, 2025
@microsoft-github-policy-service microsoft-github-policy-service Bot added the Review - Needed The PR is being reviewed label Oct 28, 2025
@microsoft-github-policy-service
Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@jshigetomi jshigetomi requested a review from a team as a code owner January 19, 2026 20:06
@jshigetomi
Copy link
Copy Markdown
Collaborator

jshigetomi commented Jan 19, 2026

@xtqqczze Thanks for the clean up on these sealed classes! I did not find any issues with the PR.

@xtqqczze
Copy link
Copy Markdown
Contributor Author

@jshigetomi can we merge?

@jshigetomi jshigetomi merged commit 28a2e35 into PowerShell:master Mar 18, 2026
36 checks passed
@xtqqczze xtqqczze deleted the sealed-dispose-p1 branch April 5, 2026 23:49
JustinGrote pushed a commit to JustinGrote/PowerShell that referenced this pull request Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log Review - Needed The PR is being reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants