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

std::allocator::destroy

STD::分配器::销毁

Defined in header
void destroy( pointer p (until C++11)
template< class U > void destroy( U* p (since C++11) (deprecated since C++17)

调用指向的对象的析构函数。p...

1%29次电话((T*)p)->~T()

2%29次电话p->~U()

参数

p-pointer to the object that is going to be destroyed

返回值

%280%29

另见

destroy staticdestructs an object stored in the allocated storage (function template)

© cppreference.com

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

http://en.cppreference.com/w/cpp/Memory/allocator/destruction