Boost logo

Boost :

Subject: Re: [boost] [object_pool] too slow?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-03-16 17:48:15


Ben Muzal wrote:
> Like I said, if you want the destructors called when the pool is
> destroyed, you should be using a container not a pool. (allocators are
> not containers. containers delete the objects they hold because they
> own them. Allocators however do not own the objects that they
> allocate.)

You're missing the point of boost::object_pool.

> But that is not really the point of my post. That 'feature' of the
> destructor will have to stay so that it does not break any existing
> code.

This feature has to stay because it is the the reason
object_pool exists as a separate class.

> My real problem is the O(n^2) nature of allocating then
> dealocating N objects.
> Am I wrong that the O(n^2) behavior should be considered a BUG?

I do consider it a bug, although this isn't really the intended usage of

In Christ,
Steven Watanabe

Boost list run by bdawes at, gregod at, cpdaniel at, john at