내가 처음 custom deleter를 봤을 때에는, shared_ptr 생성자에서 한 번 custom deleter를 지정해주면 그 다음부터 reset()을 하더라도 항상 처음에 지정했던 deleter를 불러줄 거라는 기대가 있었다. 그래서 테스트를 해봤더니 그런게 아니네. custom deleter를 유지하고 싶다면 reset()을 할 때 deleter도 같이 넘겨줘야 한다. 아래 테스트 코드는 custom deleter를 지정하지 않고 reset()한 경우에는 custom deleter가 호출되지 않는다는 걸 Google Test를 이용해서 보여주는 코드이다. class TestSharedPtrFixture : public testing::Test { public: std::stringstream ..