다음을 통해 공유


default_delete

operator new을 사용하여 할당된 개체를 삭제합니다. unique_ptr에 사용하는 데 적합합니다.

template<class Type>
    struct default_delete {
        default_delete();
        template<class Other>
            default_delete(
                const default_delete<Other>&
            );
        void operator()(Type *_Ptr) const;
    };

매개 변수

  • _Ptr
    Pointer to the object to delete.

설명

The template class describes a deleter that deletes scalar objects allocated with operator new, suitable for use with template class unique_ptr. It also has the explicit specialization default_delete<Type[]>.

요구 사항

헤더 <memory>

네임스페이스: std

참고 항목

참조

<memory>