Namespaces
Variants

std::pmr::memory_resource:: 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)
void deallocate ( void * p,

std:: size_t bytes,

std:: size_t alignment = alignof ( std:: max_align_t ) ) ;
(C++17 起)

释放由 p 指向的存储空间。 p 必须是通过先前调用与 * this 相等的 memory_resource 上的 allocate ( bytes, alignment ) 所返回的指针,且其指向的存储空间尚未被释放。

等效于 do_deallocate ( p, bytes, alignment ) ;

异常

不抛出任何异常。

参见

[virtual]
释放内存
(虚私有成员函数)