You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think it is wrong behaviour.
ArrayPool should throw if we return array which already in pool, otherwise it leads to unpredictable behavior and very difficult error detection
vararr=ArrayPool<byte>.Shared.Rent(8);ArrayPool<byte>.Shared.Return(arr);// okArrayPool<byte>.Shared.Return(arr);// should throw InvalidArgumentException("array already in pool")
Tagging subscribers to this area: @dotnet/area-system-buffers
See info in area-owners.md if you want to be subscribed.
Issue Details
Description
I think it is wrong behaviour.
ArrayPool should throw if we return array which already in pool, otherwise it leads to unpredictable behavior and very difficult error detection
vararr=ArrayPool<byte>.Shared.Rent(8);ArrayPool<byte>.Shared.Return(arr);// okArrayPool<byte>.Shared.Return(arr);// should throw InvalidArgumentException("array already in pool")
Description
I think it is wrong behaviour.
ArrayPool should throw if we return array which already in pool, otherwise it leads to unpredictable behavior and very difficult error detection
Reproduction Steps
see description
Expected behavior
Actual behavior
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response
The text was updated successfully, but these errors were encountered: