Boost logo

Boost :

From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2002-05-02 13:25:21


"Greg Colvin" <greg_at_[hidden]> wrote in message
news:5.1.0.14.0.20020502104307.02ad0560_at_GMMAIL...
> >2. shared_ptr has significant size and speed overhead for COM and
> >CORBA-style smart pointers
>
> In my experience, the fastest way to handle COM locally is to do AddRef
> once when constructing a shared_ptr, and Release once when counter
> goes to zero, and save the virtual function calls.

Why do we need smart_ptr if every time I create I need to call AddRef and
every time I destroy I need to check counter?

> >4. shared_ptr is a point in smart_ptr's design space.
>
> It could be, yes. And vice versa.

No.

> Another bastion is years of experience with shared_ptr, which
> indicates that it is "good enough" for most purposes, that it
> can be tweaked over time to handle other important purposes,
> and can provide hooks for user extension in unanticipated
> ways. The syntax is easy for the most common case, easy
> enough for anticipated extensions, and well within the skill
> of those who would design new extensions.

I assume that if we provide the same syntactic convenience and hooks for
user extension we do as good as current version.

Well-slept last-night, Gennadiy.


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