diff --git a/util.h b/util.h index 2ee1c286..38ca6b28 100644 --- a/util.h +++ b/util.h @@ -72,6 +72,12 @@ namespace util std::bind (&MemoryPool::Release, this, std::placeholders::_1)); } + template + std::shared_ptr AcquireShared (TArgs&&... args) + { + return std::shared_ptr(Acquire (args...), std::bind (&MemoryPool::Release, this, std::placeholders::_1)); + } + protected: T * m_Head;