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 から取得した生メモリを解放する
(公開メンバ関数)
allocate_object によって取得した生メモリを解放する
(公開メンバ関数)
[static]
アロケータを使用してストレージを解放する
( std::allocator_traits<Alloc> の公開静的メンバ関数)
メモリを解放する
( std::pmr::memory_resource の公開メンバ関数)