
15 Nov
2008
15 Nov
'08
4:20 a.m.
On Fri, Nov 14, 2008 at 7:23 PM, Emil Dotchevski
On Fri, Nov 14, 2008 at 6:16 PM, Brendan Miller
wrote: I'm also aware of a number of problems with the shared_ptr implementation, specifically that it creates a second allocation for the counter (the counted body problem)
Using make_shared avoids the separate allocation for the control block.
I don't see a make_shared anywhere in the boost shared_ptr documentation... http://www.boost.org/doc/libs/1_36_0/libs/smart_ptr/shared_ptr.htm Am I looking in the wrong place? Yeah, I was wondering why someone hadn't done something like this... but I don't see it documented anywhere. Also, is this in TR1/C++0x's shared_ptr? I've never seen a reference to it anywhere.