17 #ifndef InstancePool_h 18 #define InstancePool_h 48 typedef typename std::vector<T*>::iterator It;
89 std::copy(instances.begin(), instances.end(),
std::vector< T * > myFreeInstances
List of reusable instances.
InstancePool(bool deleteOnQuit)
Constructor.
T * getFreeInstance()
Returns a free instance or 0 if no such exists.
A pool of resuable instances.
~InstancePool()
Destructor.
void addFreeInstances(const std::vector< T *> instances)
Adds some free, reusable instances.
bool myDeleteOnQuit
Information whether the stored instances shall be deleted.
void addFreeInstance(T *instance)
Adds a free, reusable instance.