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> の公開メンバ関数)