mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
acquire shared
This commit is contained in:
parent
a25ce2296a
commit
3a8c90c0d4
6
util.h
6
util.h
@ -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…
Reference in New Issue
Block a user