Quantcast
Channel: Cpp11 – On C++ and other OOPscenities
Viewing all articles
Browse latest Browse all 23

C++11: Smart Pointers, part 2: unique_ptr

$
0
0
C++11 ships with a set of out-of-the-box smart pointers that help us to manage the memory easily. One of those smart pointers is the unique_ptr. Consider this piece of code: If you execute this code several times, you will get three types of output: This one: ctor invoked ctor invoked HI dtor invoked dtor invoked […]

Viewing all articles
Browse latest Browse all 23

Trending Articles