Quantcast
Channel: January 2012 – Sutter’s Mill
Viewing all articles
Browse latest Browse all 7

GotW #103: Smart Pointers, Part 1 (Difficulty: 3/10)

$
0
0

JG Question

1. When should you use shared_ptr vs. unique_ptr? List as many considerations as you can.

 

Guru Questions

2. Why should you always use make_shared to allocate objects whose lifetimes will be managed by shared_ptr? Explain.

3. What’s the deal with auto_ptr?


Viewing all articles
Browse latest Browse all 7

Trending Articles