docs: update RHI API docs
This commit is contained in:
28
docs/api/rhi/texture/dtor.md
Normal file
28
docs/api/rhi/texture/dtor.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# RHITexture::~RHITexture
|
||||
|
||||
```cpp
|
||||
virtual ~RHITexture() = default;
|
||||
```
|
||||
|
||||
虚析构函数,确保派生类对象通过基类指针删除时能正确调用析构函数。
|
||||
|
||||
**参数:** 无
|
||||
|
||||
**返回:** 无
|
||||
|
||||
**线程安全:** ✅
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
// 通过基类指针销毁纹理对象
|
||||
RHITexture* texture = device->CreateTexture(desc);
|
||||
// ... 使用 texture ...
|
||||
delete texture; // 自动调用派生类析构函数
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [RHITexture 总览](texture.md) - 返回类总览
|
||||
Reference in New Issue
Block a user