How do you make std::shared_ptr not call delete() July 22, 2023 by Tarik MyType t; nasty_function(std::shared_ptr<MyType>(&t, [](MyType*){}));