55 for (
auto it = m_Pool.
begin(); it != m_Pool.
end(); ++it) {
60 template <
typename... Args>
61 T* allocate(Args... args) {
63 return new T(args...);
75 return new T(args...);
79 template <
typename... Args>
80 T* tryAllocate(Args... args) {
82 return new T(args...);
87 if (!m_Pool.tryReserve(poolSize,
true))
91 return new T(args...);
94 void deallocate(T*
object) {
100 assert(
object !=
nullptr);
111 if (m_Pool.tryReserve(poolSize,
true) && m_Pool.
count() < poolSize) {