std::scoped_allocator_adaptor<OuterAlloc,InnerAlloc...>:: destroy
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Member functions | ||||
|
scoped_allocator_adaptor::destroy
|
||||
| Non-member functions | ||||
|
(until C++20)
|
||||
| Deduction guides (C++17) |
|
定义于头文件
<scoped_allocator>
|
||
|
template
<
class
T
>
void destroy ( T * p ) ; |
(C++11 起) | |
使用外部分配器调用 p 所指向对象的析构函数,通过调用
std:: allocator_traits < OUTERMOST > :: destroy ( OUTERMOST ( * this ) , p )
其中 OUTERMOST 类型是通过调用
this
-
>
outer_allocator
(
)
,然后递归调用该调用结果上的
outer_allocator()
成员函数,直到到达没有该成员函数的类型时所返回的类型。
参数
| p | - | 指向即将被销毁对象的指针 |
返回值
(无)
参见
|
[static]
|
销毁分配存储中的对象
(函数模板) |
|
(until C++20)
|
销毁已分配存储中的对象
(
std::allocator<T>
的公开成员函数)
|