Quantcast
Channel: On C++ and other OOPscenities » unique_ptr
Browsing all 2 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

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

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...

View Article



Image may be NSFW.
Clik here to view.

C++: Smart pointers, part 3: More on unique_ptr

Ok, here I am going to write about two other features that unique_ptr has that I did not mention in my last post. unique_ptr default behavior consists on take ownership of a pointer created with new...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images