Boost logo

Boost :

From: Richard Hadsell (hadsell_at_[hidden])
Date: 2004-06-04 10:23:37


Thorsten Ottosen wrote:

>"Robert Ramey" <ramey_at_[hidden]> wrote in message news:20040603203108.C208831594_at_acme.west.net...
>| Why isn't there a version of boost::scoped_ptr<T> that takes a deleter?
>|
>| That is, why isn't there scoped_ptr<T, D> ?
>|
>| It would be useful to me.
>
>So would auto_ptr<T,D> in some of my code. In particular,
>auto_ptr<T,D&>.
>
>
Proposals to add features to scoped_ptr or scoped_array have been
discussed in the past. Fortunately (for me), the bottom line has been
to keep these objects light. If adding a deleter would require storing
a pointer, then it increases its memory usage, and that makes it heavy.

If you want to add features, you could create a variation of these
classes, but I'll reiterate my request to keep the scoped_ classes light.

(I don't care about auto_ptr at the moment.)

-- 
Dick Hadsell			914-259-6320  Fax: 914-259-6499
Reply-to:			hadsell_at_[hidden]
Blue Sky Studios                http://www.blueskystudios.com
44 South Broadway, White Plains, NY 10601

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk