-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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 of streams that are created to wrap BinaryData #44510
Conversation
Thank you for your contribution @MatthewSteeples! We will review the pull request and get back to you soon. |
/azp run net - storage - ci |
No pipelines are associated with this pull request. |
Hi @MatthewSteeples. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days. |
Hi @MatthewSteeples. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing |
API change check API changes are not detected in this pull request. |
Certain overloads for blob storage create streams to wrap the bytes that are sent in. These Streams are not disposed
which means (unless I've misunderstood something) they'll hang around for longer than required and cause additional pressure for GC.There are no breaking changes, and no changes to any API surfaces (internal or external).
EDIT: Just realised I was getting
IDisposable
andFinalizers
confused, so my comment above about extra GC pressure is incorrect. It's not necessary for these Streams to be disposed of (as MemoryStream doesn't deal with any unmanaged resources) so it's just down to whether it's considered good practice I believe.