Smart Pool

Object Pools are a commonly used pattern used in operating systems, game, and high performance computing development. However just as it can be easy to forget to return a pointer to memory, it can be easy to forget to return the memory to the pool. In this article, I layout a class that I recently used to automatically manage memory from a pool. The template pool class has 4 parts: an onEmpty policy, an allocation policy, a reset policy, and an object proxy....

April 30, 2017 · 3 min · 581 words · Robert Underwood