CMMutableDataBlockBuffer.MemoryPool
Optimize memory allocations when working with large block buffers.
Declaration
final class MemoryPoolOverview
This is a memory allocation service that holds a pool of recently deallocated memory. Its purpose is to speed up subsequent allocations of the same size. You should use a pool in cases where you need to repeatedly allocate large blocks of memory, such as a video encoding app that outputs compressed data.
This object allocates memory by page. It doesn’t sub-allocate memory within pages, so don’t use it to allocate small blocks. A pool instance deallocates memory if it isn’t reused in ageOutDuration, so that short-term peak usage doesn’t cause persistent bloat.