Browse Source

acquire shared

pull/781/head
orignal 8 years ago
parent
commit
3a8c90c0d4
  1. 6
      util.h

6
util.h

@ -72,6 +72,12 @@ namespace util @@ -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;

Loading…
Cancel
Save