次の方法で共有


default_delete

Deletes objects allocated with operator new. Suitable for use with unique_ptr.

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

Parameters

  • _Ptr
    Pointer to the object to delete.

Remarks

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[]>.

Requirements

Header: <memory>

Namespace: std

See Also

Reference

<memory>

Other Resources

<memory> Members