- Rename texture/dtor.md to destructor.md per template spec - Remove duplicate non-hyphenated fence docs (getnativehandle.md, issignaled.md, getcompletedvalue.md) - Fix template field issues: - swap-chain, command-queue: 类型 now uses 'class (abstract)' - sampler: 头文件 now uses full path 'XCEngine/RHI/RHISampler.h' - types: 类型 fixed from 'structs' to 'struct' - enums: 类型 fixed from 'enums' to 'enum class' - Fix include paths in command-queue and pipeline-layout code examples - Create missing constructor/destructor docs for 11 classes: buffer, texture, shader, device, command-list, command-queue, fence, sampler, swap-chain, pipeline-state, pipeline-layout - Update class overview pages to include constructor/destructor entries
30 lines
651 B
Markdown
30 lines
651 B
Markdown
# RHIFactory::~RHIFactory
|
|
|
|
```cpp
|
|
virtual ~RHIFactory() = default;
|
|
```
|
|
|
|
虚析构函数,确保派生类对象通过基类指针删除时能正确调用析构函数。
|
|
|
|
**参数:** 无
|
|
|
|
**返回:** 无
|
|
|
|
**线程安全:** ✅
|
|
|
|
**复杂度:** O(1)
|
|
|
|
**示例:**
|
|
|
|
```cpp
|
|
// RHIFactory 是静态工厂类,通常不需要直接销毁
|
|
// 但如果存在派生类,可以通过基类指针删除
|
|
RHIFactory* factory = /* 某些情况下获取的派生类实例 */;
|
|
delete factory; // 正确调用析构函数
|
|
```
|
|
|
|
## 相关文档
|
|
|
|
- [RHIFactory 总览](factory.md) - 返回类总览
|
|
- [CreateRHIDevice](create-rhi-device-type.md) - 创建设备
|