суббота, 21 января 2012 г.

Очередной вопрос от Герба Саттера (GotW #103: Smart Pointers, Part 1, Difficulty: 3/10)

Вопрос на самом деле несложный.

Отправлено вам пользователем Flex Ferrum через Google Reader:

источник: Sutter’s Mill, Автор: Herb Sutter, дата: 20.01.12

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?