This function will be run regardless of whether any exceptions occur, but not if the program terminates before the value goes out of scope (e.g. via std::terminate.)