Files
XCSDD/docs/api/resources/resourcemanager/unload.md
ssdfasd 58a83f445a fix: improve doc link navigation and tree display
- 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
2026-03-19 12:44:08 +08:00

622 B

ResourceManager::Unload

void Unload(const Containers::String& path)
void Unload(ResourceGUID guid)

卸载指定资源。按路径或 GUID 查找资源,如果引用计数降至零则释放资源内存。

参数:

  • path - 资源路径
  • guid - 资源全局唯一标识符

返回:

复杂度: O(1) 查找

示例:

// 按路径卸载
ResourceManager::Get().Unload("textures/player.png");

// 按 GUID 卸载
ResourceGUID guid = tex.GetGUID();
ResourceManager::Get().Unload(guid);

相关文档