35 template <
typename TType>
46 friend class Pool<TType>;
51 std::aligned_storage_t<
sizeof(TType),
alignof(TType)> _myself;
53 template <
typename... TArgs>
71 void resize(
size_t numberOfObjectStored);
86 template <
typename... TArgs>
96 std::stack<int> _available;
97 std::vector<Object> _objects;
Wrapper around a TType object managed by the Pool. Provides access to the underlying TType object.
void resize(size_t numberOfObjectStored)
Pre-allocates memory for a given number of objects.
Object & acquire(TArgs &&... p_args)
Acquires an object from the pool.
void release(Object &obj)
Releases an object back into the pool. Destroys the contained TType object and return its slot to the...