Use unique_ptr to manage the storage of pointer