- Fix link resolution with proper relative/absolute path handling - Improve link styling with underline decoration - Hide leaf nodes from tree, only show directories - Fix log file path for packaged app
32 lines
622 B
Markdown
32 lines
622 B
Markdown
# ResourceManager::Unload
|
|
|
|
```cpp
|
|
void Unload(const Containers::String& path)
|
|
void Unload(ResourceGUID guid)
|
|
```
|
|
|
|
卸载指定资源。按路径或 GUID 查找资源,如果引用计数降至零则释放资源内存。
|
|
|
|
**参数:**
|
|
- `path` - 资源路径
|
|
- `guid` - 资源全局唯一标识符
|
|
|
|
**返回:** 无
|
|
|
|
**复杂度:** O(1) 查找
|
|
|
|
**示例:**
|
|
|
|
```cpp
|
|
// 按路径卸载
|
|
ResourceManager::Get().Unload("textures/player.png");
|
|
|
|
// 按 GUID 卸载
|
|
ResourceGUID guid = tex.GetGUID();
|
|
ResourceManager::Get().Unload(guid);
|
|
```
|
|
|
|
## 相关文档
|
|
|
|
- [ResourceManager 总览](resourcemanager.md) - 返回类总览
|