docs: update resources API docs

This commit is contained in:
2026-03-20 02:35:35 +08:00
parent fd792b7df1
commit ea756c0177
314 changed files with 9439 additions and 1360 deletions

View File

@@ -0,0 +1,42 @@
# Close
关闭资源包并释放相关资源。
## 方法签名
```cpp
void Close();
```
## 详细描述
关闭当前打开的资源包,重置所有内部状态并释放相关资源。调用此方法后,包将变为无效状态,任何尝试读取文件的行为都将失败。
此方法在析构函数中会被自动调用,确保资源正确释放。
## 参数
## 返回值
## 示例
```cpp
ResourcePackage package;
if (package.Open("assets/resources.xcp")) {
// 使用包...
// 显式关闭
package.Close();
}
// 或者当 package 超出作用域时会自动关闭
```
## 相关方法
- [Open](open.md) - 打开资源包
- [IsValid](isvalid.md) - 检查包有效性