From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-01-15 08:43:14
From: "Beman Dawes" <bdawes_at_[hidden]>
> At 11:06 AM 1/14/2002, rogeeff wrote:
> >Ideally Storage Policy manages HOW to allocate/deallocate resource,
> >while Ownership policy manages WHEN to do so.
> >If we will stick to this definition, we will never need to
> >interpolicy (Storage-Ownership at least) communication.
> They need some communication, although it may be indirect via the
> class. Thus OwnershipPolicy::Release() tells the framework (via bool
> return) that StoragePolicy::Destroy() should be called.
> While StoragePolicy and OwnershipPolicy are mostly independent and
> orthogonal, it isn't quite 100%.
Actually I think that the Storage and the Ownership policies are not
orthogonal. The bool communication is an indication of this.
A possible alternative would be to parameterize the Ownership policies that
need to 'delete p' on the deallocator type.
-- Peter Dimov Multi Media Ltd.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk