简体   繁体   中英

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

BufferManager works only with buffers ie 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM