diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 273df9e..e1eab29 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -1,6 +1,6 @@ # C++ Core Guidelines -August 11, 2017 +September 17, 2017 Editors: @@ -9103,6 +9103,8 @@ Consider: X* p1 { new X }; // see also ??? unique_ptr p2 { new X }; // unique ownership; see also ??? shared_ptr p3 { new X }; // shared ownership; see also ??? + auto p4 = make_unique(); // unique_ownership, preferable to the explicit use "new" + auto p5 = make_shared(); // shared ownership, preferable to the explicit use "new" } This will leak the object used to initialize `p1` (only).