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

Ensure correct disposal with using statement #1164

Merged
merged 1 commit into from
Mar 5, 2019

Conversation

bergmeister
Copy link
Collaborator

PR Summary

Instead of calling IDisposable.Dispose(), use using statement instead to ensure that Dispose always gets called.
Please use white-space ignoring diff due to the added indentation, some of the existing code looks sub-optimal but I only want to fix this problem where .Dispose() might get called.

PR Checklist

@bergmeister bergmeister marked this pull request as ready for review March 4, 2019 20:08
Copy link
Contributor

@rjmholt rjmholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much nicer

@bergmeister bergmeister merged commit 944c5be into PowerShell:development Mar 5, 2019
bergmeister added a commit to bergmeister/PSScriptAnalyzer that referenced this pull request Mar 5, 2019
@bergmeister bergmeister added this to the 1.18 milestone Mar 5, 2019
bergmeister added a commit to bergmeister/PSScriptAnalyzer that referenced this pull request Mar 22, 2019
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.

None yet

2 participants