|
Boost : |
Subject: Re: [boost] Review Wizard report for December 2009
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2009-12-11 08:26:33
Phil Bouchard skrev:
> Thorsten Ottosen wrote:
>> Phil Bouchard skrev:
>>> Thank you for this update. A great introduction to the library can
>>> be found in the following PowerPoint presentation:
>>> https://svn.boost.org/svn/boost/sandbox/shifted_ptr/libs/smart_ptr/doc/ShiftedPointer.ppt
>>>
>>
>> Thanks.
>
> BTW I haven't corrected the presentation yet but there the disadvantages
> of a smart pointer list slowness. It was something basically copied
> from a garbage collection list of disadvantages; I forgot removing the
> bullet.
I would say one of the disadvantages of manual/smart ptr memory
management is slowness. GC, OTOH is fast. To qoute Herb Sutter:
"The only thing making .net run faster is GC".
>> Another question: is it possible to say
>>
>> shifted_ptr<T> ptr = make_shifted<T>(...)
>>
>> instead (to enhance exception-safety)?
>
> Yes just by adding some wrapper but I think the reason I did it this way
> was because 'operator new' can take advantage of a user defined allocator.
Maybe so, but you can either provide both or add
make_shifted_alloc<T>( a, ... )
>>> Furthermore I am looking forward testing shifted_ptr on Mozilla
>>> Firefox...
>>
>> Please do tells us what you observe. Is Firefox using shared_ptr
>> already, or?
>
> No but I see memory leaks and a huge consumption of memory ;)
Oh, yes, I have actually moved away from FF because of this.
-Thorsten
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk