Boost logo

Boost :

Subject: Re: [boost] [utility] new auto_buffer class --- RFC
From: Matt Calabrese (rivorus_at_[hidden])
Date: 2009-03-02 09:49:35

A very useful addition, I'm all for it.

On Mon, Mar 2, 2009 at 9:23 AM, Thorsten Ottosen <
thorsten.ottosen_at_[hidden]> wrote:

> There is one thing that could make boost::scoped_array<T> (and
> scoped_ptr<T> for that matter) occupy a slight niche. There is
> no general way to give up ownership of the buffer inside
> boost::auto_buffer<T> because it might be on the heap, or it might be on
> the stack. If boost::scoped_array<T> added a release() member function it
> would occupy that niche. release() is really useful to have when dealing
> with legacy code, so I have been unable to understand why it is not there in
> the first place (and yes, I understand the encapsulation concerns, but much
> prefer usability when we have to choose one of them).

I have the same issue and I'm glad to see I'm not the only one. A release
function really should be there IMO.

-Matt Calabrese

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