#include <objectpool.hh>
Public Member Functions | |
T * | get () |
void | put (T *object) |
~object_pool () | |
Private Types | |
typedef boost::mutex | mutex |
Private Attributes | |
std::list< T * > | m_available |
boost::mutex | m_mutex |
A pool of already-constructed objects
This class manages a list of heap-allocated constructed objects.
The pool is thread-safe
Definition at line 22 of file objectpool.hh.
typedef boost::mutex utilmm::pools::object_pool< T >::mutex [private] |
Definition at line 27 of file objectpool.hh.
utilmm::pools::object_pool< T >::~object_pool | ( | ) | [inline] |
Definition at line 30 of file objectpool.hh.
T* utilmm::pools::object_pool< T >::get | ( | ) | [inline] |
Definition at line 33 of file objectpool.hh.
void utilmm::pools::object_pool< T >::put | ( | T * | object | ) | [inline] |
Definition at line 43 of file objectpool.hh.
std::list<T*> utilmm::pools::object_pool< T >::m_available [private] |
Definition at line 25 of file objectpool.hh.
boost::mutex utilmm::pools::object_pool< T >::m_mutex [private] |
Definition at line 24 of file objectpool.hh.