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

Dispose of streams that are created to wrap BinaryData #44510

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

MatthewSteeples
Copy link
Contributor

@MatthewSteeples MatthewSteeples commented Jun 11, 2024

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 and Finalizers 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.

@github-actions github-actions bot added Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. Storage Storage Service (Queues, Blobs, Files) labels Jun 11, 2024
Copy link

Thank you for your contribution @MatthewSteeples! We will review the pull request and get back to you soon.

@amnguye
Copy link
Member

amnguye commented Jul 22, 2024

/azp run net - storage - ci

Copy link

No pipelines are associated with this pull request.

Copy link

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.

@github-actions github-actions bot added the no-recent-activity There has been no recent activity on this issue. label Sep 27, 2024
Copy link

github-actions bot commented Oct 4, 2024

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 /reopen if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the no-recent-activity label; otherwise, this is likely to be closed again with the next cleanup pass.

@github-actions github-actions bot closed this Oct 4, 2024
@amnguye amnguye reopened this Oct 4, 2024
@github-actions github-actions bot removed the no-recent-activity There has been no recent activity on this issue. label Oct 4, 2024
@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@amnguye amnguye merged commit 4607949 into Azure:main Oct 4, 2024
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants