2026년 4월 19일CPP스마트 포인터(std::unique_ptr / std::shared_ptr / std::weak_ptr)소유권/공유/약한 참조를 자동으로 관리해 메모리 누수와 해제를 안전하게 처리하는 스마트 포인터 예제