Editorial question16.8K views2,132 votes0 answers1,117 following
AI-generatedArrayPool<T>.Shared Buffer Clearing and Cross-Instance Return
The goal is to rent buffers from ArrayPool<T>.Shared and return them without retaining memory outside the pool. The API does not require that an array be returned to the same ArrayPool<T> instance that rented it, and it does not detect duplicate Return calls. The clearArray parameter defaults to false, so prior contents can remain visible to the