c++ custom deleter
Destruction order vs thread safety in C++