$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2002-04-19 12:40:40
"Douglas Gregor" <gregod_at_[hidden]> wrote in message
news:200204191248.g3JCmwM08260_at_mailout5.nyroc.rr.com...
> On Thursday 18 April 2002 11:56 pm, you wrote:
> > >My general feeling is that there needs to be something like
> >
> > 'boost::smart_ptr<T>' which is appropriately configured for the
> > specific
> > needs of type 'T' (eg. intrusive vs. external counters are probably
> > type specific), to application wide preferences (eg. multi-threading
> > support is likely to be configured application wide - at least for
> > most
> > cases), and otherwise useful defaults.<
> >
> > The problem here is that you don't want to specialize smart_ptr<T> for
> > all types that, for example, use COM's intrusive reference counting.
> > There are many such types in the application and you don't really want
> > to configure smart_ptr separately for each.
>
> But suppose that you didn't need to configure smart_ptr individually for
each
> type. Would you then agree with the premise, that the type of reference
> counting is almost always dependent on 'T' for 'smart_ptr<T>'?
What if for the same type T you want:
scope_tr
shared_ptr (intrusive or not)
holder with deep copy logic
auto_ptr
?? more
And this is only one decision: type of ownership strategy you need
Gennadiy.