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 起)
(C++20 起为 constexpr)

使用分配器 a 来释放 p 所引用的存储空间,通过调用 a. deallocate ( p, n ) 实现。

目录

参数

a - 使用的分配器
p - 指向先前分配存储的指针
n - 存储空间为其分配的对象数量

返回值

(无)

示例

另请参阅

[static]
使用分配器分配未初始化的存储空间
(公开静态成员函数)
释放存储空间
( std::allocator<T> 的公开成员函数)