Boost logo

Boost :

Subject: Re: [boost] Interest in a simple buffer abstraction?
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2011-01-27 09:44:05

On 27/01/2011 15:10, Boris Kolpackov wrote:

> You probably mean "freeing said buffer" instead of "copying said buffer".
> The simplest approach would be to stipulate that such a buffer should be
> allocated with operator new[] and freed with operator delete[].

Oh and calling delete[] (or delete for that matter) on a different type
than the one that was used for new[]/new (or a non-base type if the
destructor is virtual) is undefined behaviour.

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