Files
XCEngine/docs/api/rhi/descriptor-pool/destructor.md
2026-03-20 02:35:45 +08:00

729 B

RHIDescriptorPool::~RHIDescriptorPool

virtual ~RHIDescriptorPool() = default;

虚析构函数,确保派生类对象能被正确销毁。

详细描述

析构函数是虚函数,允许通过基类指针正确删除派生类对象。在销毁描述符池前,应确保已经调用 Shutdown 释放资源。

参数列表

无参数。

返回值

无返回值。

示例代码

// 通过基类指针销毁派生类对象
RHIDescriptorPool* pool = factory->CreateDescriptorPool();
// ... 使用 pool
delete pool; // 正确调用析构函数

相关文档