Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2001-12-21 20:41:47


At 02:58 PM 12/21/2001, Peter Dimov wrote:

>From: "Ed Brey" <edbrey_at_[hidden]>
>>
>> Not so fast. Containers don't directly contain scoped_ptrs, but they
can
>contain them indirectly (e.g. contain pointers to objects that house
them).
>It is not uncommon to have lots of a smallish, noncopyable class that
would
>use scoped_ptr. Even given heap overhead, increasing the size of
>scoped_ptr
>can make a big difference in overall memory used.
><
>
>Do you have a concrete example of a real-world project where increasing
the
>size of scoped_ptr from 4 to 8 makes a big difference?

Commercial code I maintain is full of objects which contain only
scoped_ptr<>'s.

The whole point of scoped_ptr<> is simplicity. Don't make it more
complicated; that's not what it is all about.

--Beman


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