Take Up Code

126: Data Types: Smart Pointers Part 1.

08:45 | Jun 16th, 2016

The C++ language guarantees that destructors run at specific times even if an exception is thrown. You can use this to make sure that other cleanup work gets done. That’s what smart pointers do. Let’s say you create a new object by calling new. You’r...Show More