make-shared Questions

3

Solved

I am using boost::make_shared for the first time to create objects pointed to by shared pointers. Mainly because our code was too slow and the single allocation really helped to improve performance...
Persuader asked 12/3, 2012 at 21:42

4

Solved

I was experimenting with shared_ptr and make_shared from C++11 and programmed a little toy example to see what is actually happening when calling make_shared. As infrastructure I was using llvm/cla...
Traceytrachea asked 15/2, 2012 at 22:12

1

Solved

Using gcc 4.6.2, make_shared() gives a useless backtrace (apparently due to some rethrow) if a constructor throws an exception. I'm using make_shared() to save a bit of typing, but this is show sto...
Plaything asked 10/2, 2012 at 19:8

1

While I have std::tr1::shared_ptr<T> available in my compiler, I don't have make_shared. Can someone point me to a proper implementation of make_shared? I see that I need to use varargs to p...
Interstitial asked 3/2, 2012 at 20:34

1

Solved

(Using Visual Studio 2010) I'm trying to create a shared_ptr of an existing class in my project (class was written a decade before std::shared_ptr existed). This class takes a non-const pointer to ...
Lomax asked 9/1, 2012 at 14:5

2

Solved

In the boost doc of make_shared, it says: Besides convenience and style, such a function is also exception safe and considerably faster because it can use a single allocation for both the obje...
Gubernatorial asked 12/8, 2011 at 17:45

© 2022 - 2024 — McMap. All rights reserved.