Boost logo

Boost :

From: Kevin Atkinson (kevinatk_at_[hidden])
Date: 2000-03-28 04:37:38

On Tue, 28 Mar 2000, Kevin Atkinson wrote:

> On Tue, 28 Mar 2000, Ian Bruntlett wrote:
> > So I hit on the idea that auto_resource<> shouldn't implement its destructor
> > at all - the user implements the destructor.
> >
> > I'd like to ask a few questions:
> > 1. Has this been done already?
> > 2. Is it feasable?
> Well how the heck do you manage to pull that off withot pasing in a
> function class, function, or something like that.

After reading it again I take it you want auto_ptr to inherit a class.
But in you want how it destroys the object you will STILL have to have an
extra class. So you really did not save anything.

Also for other "smart" pointers the delete is not always in the
destructor..... It is best to pass in a function object (or something
similar) to control how the object is destroyed.

Kevin Atkinson

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