From: rogeeff (rogeeff_at_[hidden])
Date: 2002-01-14 11:06:45
--- In boost_at_y..., "Peter Dimov" <pdimov_at_m...> wrote:
> From: "Andrei Alexandrescu" <andrewalex_at_h...>
> > The proof is in the pudding, but I'll try to reply in short below.
> > > 1. Why the separate Storage and Ownership policies?
> > They are orthogonal for the most part. For example, there is no
> > the fact that you allocate a pointer with new and the fact that
> > reference count it. Same pointer allocated with new you also may
> > reference link (maintain a linked list between all pointers to
> > object) or simply treat it as an auto_ptr. As far as the
> > concerned, the managed resource can be allocated anyhow and can
> > be a pointer at all.
> So, the Storage policy says how is the resource (de)allocated, and
> Ownership policy says how is it... what? Copied?
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.
> 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