Common ArrayPool Mistakes11/14/2026
In this post I review common mistakes I find (and sometimes make) when using ArrayPool<T> in .NET and C#. Examples target the .NET 10 runtime and the corresponding BCL.
ArrayPool<T> lets you rent arrays from a shared pool. It's typically used to obtain a temporary buffer for intermediate work before copying results to a final destination. When a method cannot update input data in place or requires a larger buffer for intermediate calculations, ArrayPool<T> is often beneficial: it avoids allocating a new array for every operation, reducing GC pressure and improving performance. The most common generic types used with ArrayPool are byte and char.
Typical usage involves three steps:
- Rent an array from the pool.
- Use the rented array for operations.
- Return the array to the pool.