30 lines
604 B
Markdown
30 lines
604 B
Markdown
|
|
# RHICommandList::~RHICommandList
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
virtual ~RHICommandList() = default;
|
||
|
|
```
|
||
|
|
|
||
|
|
虚析构函数,确保派生类对象通过基类指针删除时能正确调用析构函数。
|
||
|
|
|
||
|
|
**参数:** 无
|
||
|
|
|
||
|
|
**返回:** 无
|
||
|
|
|
||
|
|
**线程安全:** ✅
|
||
|
|
|
||
|
|
**复杂度:** O(1)
|
||
|
|
|
||
|
|
**示例:**
|
||
|
|
|
||
|
|
```cpp
|
||
|
|
// 通过基类指针销毁命令列表对象
|
||
|
|
RHICommandList* cmdList = device->CreateCommandList(desc);
|
||
|
|
// ... 使用 cmdList ...
|
||
|
|
delete cmdList; // 自动调用派生类析构函数
|
||
|
|
```
|
||
|
|
|
||
|
|
## 相关文档
|
||
|
|
|
||
|
|
- [RHICommandList 总览](command-list.md) - 返回类总览
|
||
|
|
- [Shutdown](shutdown.md) - 关闭命令列表
|