proxygen
folly::detail::IndexedMemPoolRecycler< Pool > Struct Template Reference

#include <IndexedMemPool.h>

Public Member Functions

 IndexedMemPoolRecycler (Pool *pool)
 
 IndexedMemPoolRecycler (const IndexedMemPoolRecycler< Pool > &rhs)=default
 
IndexedMemPoolRecycleroperator= (const IndexedMemPoolRecycler< Pool > &rhs)=default
 
void operator() (typename Pool::value_type *elem) const
 

Public Attributes

Pool * pool
 

Detailed Description

template<typename Pool>
struct folly::detail::IndexedMemPoolRecycler< Pool >

This is a stateful Deleter functor, which allows std::unique_ptr to track elements allocated from an IndexedMemPool by tracking the associated pool. See IndexedMemPool::allocElem.

Definition at line 40 of file IndexedMemPool.h.

Constructor & Destructor Documentation

template<typename Pool>
folly::detail::IndexedMemPoolRecycler< Pool >::IndexedMemPoolRecycler ( Pool *  pool)
inlineexplicit

Definition at line 547 of file IndexedMemPool.h.

References folly::detail::rhs.

template<typename Pool>
folly::detail::IndexedMemPoolRecycler< Pool >::IndexedMemPoolRecycler ( const IndexedMemPoolRecycler< Pool > &  rhs)
default

Member Function Documentation

template<typename Pool>
void folly::detail::IndexedMemPoolRecycler< Pool >::operator() ( typename Pool::value_type *  elem) const
inline

Definition at line 553 of file IndexedMemPool.h.

References FOLLY_POP_WARNING.

553  {
554  pool->recycleIndex(pool->locateElem(elem));
555  }
template<typename Pool>
IndexedMemPoolRecycler& folly::detail::IndexedMemPoolRecycler< Pool >::operator= ( const IndexedMemPoolRecycler< Pool > &  rhs)
default

Member Data Documentation

template<typename Pool>
Pool* folly::detail::IndexedMemPoolRecycler< Pool >::pool

Definition at line 545 of file IndexedMemPool.h.


The documentation for this struct was generated from the following file: