|
VLink
2.0.0
A high-performance communication middleware
|
Custom deleter installed on every RAII handle handed out by get / get_shared.
更多...
#include <object_pool.h>
Public 成员函数 | |
| void | operator() (T *ptr) const noexcept |
Returns ptr to the pool, or deletes it when the pool is gone. 更多... | |
Public 属性 | |
| std::weak_ptr< ObjectPool< T > > | weak_pool |
| Weak reference to the parent pool. 更多... | |
Custom deleter installed on every RAII handle handed out by get / get_shared.
Holds a non-owning weak_ptr to the parent pool. When the handle is destroyed, the deleter either returns the object via release() (when the pool is alive) or falls back to operator delete (when the pool has already been torn down).
|
inlinenoexcept |
Returns ptr to the pool, or deletes it when the pool is gone.
| ptr | Raw pointer to the object being released; nullptr is silently ignored. |
| std::weak_ptr<ObjectPool<T> > vlink::ObjectPool< T >::PoolDeleter::weak_pool |
Weak reference to the parent pool.