Namespaces
Variants

std::allocator_traits<Alloc>:: deallocate

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)
定義先ヘッダ <memory>
static void deallocate ( Alloc & a, pointer p, size_type n ) ;
(C++11以降)
(constexpr C++20以降)

アロケータ a を使用して、 p が参照するストレージを a. deallocate ( p, n ) を呼び出すことで解放します。

目次

パラメータ

a - 使用するアロケータ
p - 以前に割り当てられたストレージへのポインタ
n - ストレージが割り当てられたオブジェクトの数

戻り値

(なし)

関連項目

[static]
アロケータを使用して未初期化のストレージを割り当てる
(公開静的メンバ関数)
ストレージを解放する
( std::allocator<T> の公開メンバ関数)