|
Boost Users : |
From: John Maddock (john_at_[hidden])
Date: 2008-03-25 12:27:14
Joost Meijles wrote:
> Hi All,
>
> I am trying to use the Boost Pool library, more specifically I am
> trying to use the singleton pool interface.
> Everything seems to work fine, till the moment I use it to create an
> object from a class containing a (STL) map, which results in a
> segmentation fault. Does anyone know why this happens, or how to work
> around it?
>
> What I find also strange is that the constructor and destructor of
> the class doesn't seem to be called when using the pool. Is this
> normal behavior?
>
> Please find below the example that causes the segmentation fault (and
> the not calling of the constructor/destructor issue).
Pool traffics in raw memory, not objects, you need to construct the object
inplace and destroy it yourself, or else use object_pool.
HTH, John.
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