Namespaces
Variants

std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>:: 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)
定义于头文件 <scoped_allocator>
void deallocate ( pointer p, size_type n ) noexcept ;
(C++11 起)

使用外部分配器解除分配 p 所引用的存储空间,通过调用 std:: allocator_traits < OuterAlloc > :: deallocate ( outer_allocator ( ) , p, n )

参数

p - 指向先前分配内存的指针
n - 为其分配内存的对象数量

返回值

(无)

参阅

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