首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::scoped_allocator_adaptor::destroy

Defined in header <scoped_allocator>

template< class T > void destroy( T* p );

(since C++11)

使用外部分配器调用p打电话。

std::allocator_traits<OUTERMOST>::destroy(OUTERMOST(*this), p)...

其中最外层的类型是通过调用this->outer_allocator(),然后调用outer_allocator()成员函数对此调用的结果进行递归处理,直到到达没有此类成员函数的类型为止。

参数

p

-

pointer to the object that is going to be destroyed

返回值

%280%29

另见

destroy static

destructs an object stored in the allocated storage (function template)

destroy (deprecated in C++17)

destructs an object in allocated storage (public member function of std::allocator)

代码语言:txt
复制
 © cppreference.com

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

扫码关注腾讯云开发者

领取腾讯云代金券