acquire shared

This commit is contained in:
orignal 2017-01-19 10:20:34 -05:00
parent a25ce2296a
commit 3a8c90c0d4

6
util.h
View File

@ -72,6 +72,12 @@ namespace util
std::bind (&MemoryPool<T>::Release, this, std::placeholders::_1));
}
template<typename... TArgs>
std::shared_ptr<T> AcquireShared (TArgs&&... args)
{
return std::shared_ptr<T>(Acquire (args...), std::bind (&MemoryPool<T>::Release, this, std::placeholders::_1));
}
protected:
T * m_Head;