06.20.2016 - By Take Up Code: build your own computer games, apps, and robotics with podcasts and live classes
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 is what smart pointers do.