- Update README.md project structure docs/api section - Add missing audio/, components/, scene/ directories - Reorder alphabetically - Update Components test count from 2+ to 3 - Expand documentation section with module listings - Remove incomplete audio-source and audio-listener component docs from components.md (referenced 30+ and 16+ non-existent method docs)
31 lines
530 B
Markdown
31 lines
530 B
Markdown
# Texture::~Texture
|
|
|
|
```cpp
|
|
virtual ~Texture()
|
|
```
|
|
|
|
析构函数。释放纹理占用的资源。
|
|
|
|
**参数:** 无
|
|
|
|
**返回:** 无
|
|
|
|
**线程安全:** ❌
|
|
|
|
**示例:**
|
|
|
|
```cpp
|
|
{
|
|
Texture tex;
|
|
tex.Create(1024, 1024, 1, 1,
|
|
TextureType::Texture2D,
|
|
TextureFormat::RGBA8_UNORM,
|
|
nullptr, 0);
|
|
// tex 超出作用域时自动调用析构函数释放资源
|
|
}
|
|
```
|
|
|
|
## 相关文档
|
|
|
|
- [Texture 总览](texture.md) - 返回类总览
|
|
- [Release](../iresource/release.md) - 手动释放资源方法 |