Skip to content

Undisposed MemoryStream #23271

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

Closed
pinki opened this issue Jun 23, 2020 · 3 comments
Closed

Undisposed MemoryStream #23271

pinki opened this issue Jun 23, 2020 · 3 comments
Labels
area-identity Includes: Identity and providers good first issue Good for newcomers. ✔️ Resolution: Won't Fix Resolved because we decided not to change the behavior reported in this issue. help wanted Up for grabs. We would accept a PR to help resolve this issue Status: Resolved
Milestone

Comments

@pinki
Copy link

pinki commented Jun 23, 2020

I just dove a bit into Identity's source code and saw that in DataProtectorTokenProvider.cs there's a MemoryStream that's not being disposed.

Proposal: Put the MemoryStream into a using statement to dispose it after use.

@javiercn javiercn added the area-identity Includes: Identity and providers label Jun 23, 2020
@GrabYourPitchforks
Copy link
Member

Just a note from the runtime perspective: there are no negative consequences that will result from failing to dispose a MemoryStream instance. Other Stream-derived types (including any custom subclasses of MemoryStream) may contain custom dispose logic.

@pinki
Copy link
Author

pinki commented Jun 23, 2020

Ah, okay. I didn't know that. I always put it inside a using, because it implements IDisposable.
Thanks!

@blowdart blowdart added area-dataprotection Includes: DataProtection area-identity Includes: Identity and providers and removed area-identity Includes: Identity and providers area-dataprotection Includes: DataProtection labels Jun 23, 2020
@blowdart
Copy link
Contributor

We'd accept a PR for this :)

@blowdart blowdart added help wanted Up for grabs. We would accept a PR to help resolve this issue good first issue Good for newcomers. labels Jun 24, 2020
@blowdart blowdart added this to the Backlog milestone Jun 24, 2020
@HaoK HaoK closed this as completed Jun 30, 2020
@HaoK HaoK added the ✔️ Resolution: Won't Fix Resolved because we decided not to change the behavior reported in this issue. label Jun 30, 2020
@ghost ghost added the Status: Resolved label Jun 30, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Jul 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-identity Includes: Identity and providers good first issue Good for newcomers. ✔️ Resolution: Won't Fix Resolved because we decided not to change the behavior reported in this issue. help wanted Up for grabs. We would accept a PR to help resolve this issue Status: Resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants