1
0
mirror of https://github.com/PurpleI2P/i2pd.git synced 2025-01-22 04:04:16 +00:00

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)); 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: protected:
T * m_Head; T * m_Head;