std::shared_ptr은 std::unique_ptr과 함께 C++11부터 사용 가능한 smart pointer 이다. std::shared_ptr is a smart pointer that retains shared ownership of an object through a pointer. (http://en.cppreference.com/w/cpp/memory/shared_ptr)std::unique_ptr과 다른점은 ownership을 공유(shared)한다는 점이다.std::shared_ptr 객체를 만들때 한가지 문제가 되는 부분이 있는데, 아래와 같은 상황이 발생하지 않도록 주의해야 한다는 점이다.Bad* p = new Bad;std::shared_ptr a1(p);std::shared_..