Skip to content

Remove stale information in ArrayPool.Shared remarks#125109

Merged
jkotas merged 1 commit intodotnet:mainfrom
lolleko:patch-2
Mar 3, 2026
Merged

Remove stale information in ArrayPool.Shared remarks#125109
jkotas merged 1 commit intodotnet:mainfrom
lolleko:patch-2

Conversation

@lolleko
Copy link
Contributor

@lolleko lolleko commented Mar 3, 2026

I was copying the SharedArrayPool implementation to create a slightly modified version of it.
Stumbled across this part of the doc comment, looking for this special handling to replicate it too.
But I couldn't find any special handling for byte or char arrays.
Pretty sure his was removed at some point and the comment was not updated to reflect the changes.

I searched through the history and this seems to be the commit that removed the special handling:
55117cd#diff-ea6685d3a394b3859a91b3765060078fe0b7a9dc9989f30cd8893bd55cc853f3

There no longer is any special handling of bytes/chars when using the shared array pool
Copilot AI review requested due to automatic review settings March 3, 2026 11:43
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates that the PR has been added by a community member label Mar 3, 2026
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-buffers
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Removes outdated XML documentation on ArrayPool<T>.Shared that referenced special pooling behavior for byte[]/char[], aligning the remarks with the current SharedArrayPool<T> implementation.

Changes:

  • Deleted stale remarks claiming byte[]/char[] use a special optimized pool implementation.

Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

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

Thanks. Yes, the special-casing was removed years ago in lolleko@55117cd#diff-ea6685d3a394b3859a91b3765060078fe0b7a9dc9989f30cd8893bd55cc853f3.

@jkotas
Copy link
Member

jkotas commented Mar 3, 2026

/ba-g OSX timeout

@jkotas jkotas merged commit 0034033 into dotnet:main Mar 3, 2026
150 of 154 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-System.Buffers community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants