Boost logo

Boost Users :

Subject: [Boost-users] newbie: help to start with object_pool
From: Jenia (jenia_at_[hidden])
Date: 2009-10-08 07:42:51


Hi
this is my first try with boost. I need an object pool, where I can
preallocate X objects and reuse them with ability to allocate more if
the pool runs empty and shrink my pool if needed. My questions:

1. Is object_pool suitable for this purpose?
2. Does object_pool.free() returns object memory to the pool or return
pool's memory to the system?
3. How do I use object_pool.construct()? I didn't get the number of
parameters requirement in the documentation
(http://www.boost.org/doc/libs/1_40_0/libs/pool/doc/interfaces/object_pool.html)


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net