Boost logo

Boost :

Subject: Re: [boost] [Smart Ptr] make_shared slower than shared_ptr(new) on VC++9 (and 10) with fix
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2012-04-26 16:08:47


On Thu, Apr 26, 2012 at 1:06 PM, Mathias Gaunard <
mathias.gaunard_at_[hidden]> wrote:

> On 26/04/12 19:41, Dave Abrahams wrote:
>
>>
>> on Thu Apr 26 2012, "Stephan T. Lavavej"<stl-AT-exchange.**microsoft.com<http://stl-AT-exchange.microsoft.com>>
>> wrote:
>>
>> [STL]
>>>
>>>> Each is optimally sized (in particular, make_shared/allocate_shared
>>>> implement the "we know where you live" optimization that I have
>>>> previously described
>>>>
>>>
>>> [Dave Abrahams]
>>>
>>>> I can't find that description. Pointer please?
>>>>
>>>
>>> See
>>> http://channel9.msdn.com/**Events/GoingNative/**
>>> GoingNative-2012/STL11-Magic-**Secrets<http://channel9.msdn.com/Events/GoingNative/GoingNative-2012/STL11-Magic-Secrets>
>>> (which also has links to my slides - viewable online even without
>>> PowerPoint), in particular Slide 6.
>>>
>>
>> 9:30 or so in the video.
>>
>
> Explicit destructor calls on memory that doesn't come from the free store?
>
> Sounds like there are potential strict aliasing problems there.
>

Doesn't the same thing happen in boost::optional and boost::variant?

- Jeff


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