Boost logo

Boost :

From: Greg Colvin (Gregory.Colvin_at_[hidden])
Date: 2003-02-28 13:34:59


At 09:16 AM 2/28/2003, David Abrahams wrote:
>Alisdair Meredith <alisdair.meredith_at_[hidden]> writes:
>
>> Peter Dimov wrote:
>>
>>
>>> It depends on the choice of template parameters, of course. If you go the PB
>>> way, resource<> is definitely a contender:
>>
>> This is definitely the direction I was thinking. Otherwise, we get
>> shared_resource, scoped_resource, movable_resource, etc and we start
>> wanting an abbreviation like _ptr <g> [or in this case, _rsrc?]
>>
>> I certainly like the policy approach here, as I see a policy-based smart
>> pointer and a policy-based resource-manager sharing ownership policies.
>> I still see them as different but related concepts though.
>
>I just want to point out, before I leave this conversation, that it
>hasn't been demonstrated that a useful design for a generalized
>resource manager is even possible, so worrying about names might be a
>way to avoid dealing with the issue of clarifying what it is/does and
>how it works ;-)

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.


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