Boost logo

Boost :

From: Alisdair Meredith (alisdair.meredith_at_[hidden])
Date: 2003-03-01 12:16:38


Greg Colvin wrote:

> Which is why the original releaser<> proposal is not in the standard.
> There are just too many different kinds of resource, with too many
> different ways of acquiring and releasing them. So it wasn't clear
> that any general facility could improve on just wrapping each resource
> in a class with constructors that acquire the resource and a destructor
> that releases it.

The principle advantage the releaser<>-type class is that it gives us
something to attach policies to. It is difficult to apply policies in a
vacuum. In fact AFAICT the only purpose of this hypothetical class is
purely as a policy-holder!

-- 
AlisdairM

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