Namespaces
Variants

std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>:: destroy

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)
헤더 파일에 정의됨 <scoped_allocator>
template < class T >
void destroy ( T * p ) ;
(C++11부터)

외부 할당자를 사용하여 p 가 가리키는 객체의 소멸자를 호출합니다. 다음을 호출하여 수행합니다:

std:: allocator_traits < OUTERMOST > :: destroy ( OUTERMOST ( * this ) , p )

여기서 OUTERMOST는 this - > outer_allocator ( ) 를 호출한 결과로 반환되는 타입이며, 이러한 멤버 함수를 더 이상 가지고 있지 않은 타입에 도달할 때까지 이 호출의 결과에 대해 outer_allocator() 멤버 함수를 재귀적으로 호출하는 것을 의미합니다.

매개변수

p - 파괴될 객체를 가리키는 포인터

반환값

(없음)

참고 항목

[static]
할당된 저장 공간에 저장된 객체를 파괴함
(함수 템플릿)
(until C++20)
할당된 저장 공간의 객체를 파괴함
( std::allocator<T> 의 public 멤버 함수)