Re:Mistakes to avoid with C++ 11 smart pointers
by zvrba on Sunday May 15, 2016 @02:35AM
(#11699782)
Most important advantage: RAII. You cannot forget to free the pointee even in the presence of exceptions. The "bugs" described in the article are just a case of not having read the manual. (Like, who in their right mind would assume that wrapping something in a shared_ptr would make it thread-safe?!)
[ Parent
| on HN ]
There are no comments on this comment yet.