Boost logo

Boost :

From: Beman Dawes (beman_at_[hidden])
Date: 2000-03-12 19:58:05

At 07:40 PM 3/7/00 +0100, Nicolai Josuttis wrote:

>o Shouldn't auto_array be provided (for completeness) ?

I suppose so.

>o The decision was made to use a direct detached implementation
> technique. To cite the text:
> "We went so far as to run various timings of the direct and
>approaches, and found
> that at least on Intel Pentium chips there was very little
> However, the smart pointer tests give a totally different view.
Following them
> using a direct detached implementation is a significant penalty.
> So, why do we still use the direct detached implementation

The timings didn't include the indirect approach which allocates both
the count and the pointer on the heap. You were probably looking at
the timings for one of the other flavors. And yes, they are faster
that the version now up on the site.

>o I wonder, whether it would be useful to parametrize the release
> at least for scoped_ptr and scoped_array.

Several boost people tried to do that late last fall - there were
some proposals but the discussion kind of dribbled off. We need to
revisit it.

> Couldn't we implement a template for two types, the element type
and the
> release operation. This would allow to use the "resource
acquisition is
> initialization" idiom with other acquisitions than new and new[].
> Attached is an example implementation.

I will take a look; in the meantime you might want to look at how
Kevin Atkinson's ClonePtr and CopyPtr take 2 parameterization.


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