Files
XCSDD/docs/api/resources/resourcemanager/unloadunused.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

486 B

ResourceManager::UnloadUnused

void UnloadUnused()

卸载所有无引用的资源。遍历资源缓存,将引用计数为零的资源全部释放。常在场景切换或内存紧张时调用。

参数:

返回:

复杂度: O(n)

示例:

// 切换场景时清理无用资源
void OnSceneUnload() {
    ResourceManager::Get().UnloadUnused();
}

相关文档