Namespaces
Variants

std::pmr::polymorphic_allocator<T>:: delete_object

From cppreference.net
Memory management library
( exposition only* )
Allocators
Uninitialized memory algorithms
Constrained uninitialized memory algorithms
Memory resources
Uninitialized storage (until C++20)
( until C++20* )
( until C++20* )
( until C++20* )

Garbage collector support (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
(C++11) (until C++23)
template < class U >
void delete_object ( U * p ) ;
(C++20부터)

U 타입의 객체를 파괴하고 해당 객체에 할당된 저장 공간을 해제합니다.

다음에 해당함
std:: allocator_traits < polymorphic_allocator > :: destroy ( * this, p ) ;
deallocate_object ( p ) ;

목차

매개변수

p - 파괴하고 할당 해제할 객체에 대한 포인터

예외

아무것도 던지지 않습니다.

참고 사항

이 함수는 완전히 특수화된 할당자 std:: pmr :: polymorphic_allocator <> 와 함께 사용하기 위해 도입되었으나, 어떤 특수화에서도 유용할 수 있습니다.

참고 항목

allocate_bytes 로부터 얻은 원시 메모리를 해제합니다
(public member function)
allocate_object 로 얻은 원시 메모리를 해제합니다
(public member function)
[static]
할당자를 사용하여 저장 공간을 해제합니다
( std::allocator_traits<Alloc> 의 public static member function)
메모리를 해제합니다
( std::pmr::memory_resource 의 public member function)