Files
XCEngine/docs/api/rhi/d3d12/command-list/destructor.md

36 lines
664 B
Markdown
Raw Normal View History

# D3D12CommandList::~D3D12CommandList
析构函数,销毁 D3D12CommandList 对象。
```cpp
~D3D12CommandList() override;
```
## 参数
## 返回值
**线程安全:** 非线程安全,请在所有 GPU 操作完成后销毁对象
**复杂度:** O(n) - 取决于资源释放时间
## 示例
```cpp
#include "XCEngine/RHI/D3D12/D3D12CommandList.h"
{
D3D12CommandList commandList;
commandList.Initialize(device, CommandQueueType::Direct);
// ... 使用 commandList ...
} // 超出作用域时自动调用析构函数
```
## 相关文档
- [D3D12CommandList 总览](command-list.md)
- [Shutdown](shutdown.md) - 关闭命令列表