shared_ptr보다는 unique_ptr에 더 가까울 걸?
대신 unique_ptr끼리는 move construction/assignment만 가능.
auto_ptr이 unique_ptr랑 비슷한데 소유권을 지맘대로 옮겨버림
그래서 C++11에서 move semantics가 도입된 이후로는 저런 문제가 없는 unique_ptr 쓰는 게 정석이 됨.
구와아아악
shared_ptr보다는 unique_ptr에 더 가까울 걸?
대신 unique_ptr끼리는 move construction/assignment만 가능.
auto_ptr이 unique_ptr랑 비슷한데 소유권을 지맘대로 옮겨버림
그래서 C++11에서 move semantics가 도입된 이후로는 저런 문제가 없는 unique_ptr 쓰는 게 정석이 됨.
구와아아악