I was reading libstdc++-v3 std::thread implementation and I saw that a unique_ptr is released after the thread is created, so when it runs out of scope, the memory
std::thread