Search code examples
c#.netwcfmemorymemory-management

What is the difference between BufferManager and System.Buffers.ArrayPool in C#


In what scenarios should we prefer one over other? It appears like BufferManager is not optimal for pooling large sizes of memory. Is that true?

ArrayPool Class


Solution

  • BufferManager works only with buffers i.e. arrays of type byte[], while ArrayPool can work with any type of array as it's a generic type. Their capabilities from the memory size perspective are quite similar.