在线文档教程
C++
动态内存管理 | Dynamic memory management

std::allocator::deallocate

STD::配售者::

void deallocate( T* p, std::size_t n

分配指针引用的存储。p,它必须是以前调用的指针。allocate()...

争论n必须等于调用allocate()原产p否则,行为就没有定义。

打电话::operator delete(void*),但未具体说明何时和如何调用它。

参数

p-pointer obtained from allocate()
n-number of objects earlier passed to allocate()

返回值

%280%29

另见

allocateallocates uninitialized storage (public member function)
deallocate staticdeallocates storage using the allocator (public static member function of std::allocator_traits)

© cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

http://en.cppremience.com/w/cpp/Memory/allocator/trelocation