C++ implementation of an Object Pool