Open utterances-bot opened 3 years ago
Point 5 and 6 are missing code examples. You have written that “in the above example” in both the points, but there are no examples to refer to.
thanks for checking the article @irfan-mirza ! it's updated now :) the examples should work and I also updated some links.
5 ways how unique_ptr enhances resource safety in your code - C++ Stories
Modern C++ stresses the use of RAII objects to manage resources. One of the easiest ways is just to start using unique_ptr across your code. Let’s see how we can leverage this smart pointer type. I’ve come up with 5 (or more?) reasons where unique_ptr shines. Intro One of my favourite features of modern C++ is smart pointers.
https://www.cppstories.com/2017/12/why-uniqueptr/