Replies: 1 comment 1 reply
-
Also, the current |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Looking at the StreamPolyfills class, when the input
Memory<T>
is not wrapping an array, the methods fall back to calling.ToArray()
. This will allocate a new array, use it, and then throw it away.I suspect it may be better to use the
ArrayPool<T>
class for these cases.For example, instead of:
You would have:
The
WriteAsync
method would use a similar approach:Beta Was this translation helpful? Give feedback.
All reactions