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
This commit is contained in:
25
docs/api/resources/resourcecache/onmemorypressure.md
Normal file
25
docs/api/resources/resourcecache/onmemorypressure.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# ResourceCache::OnMemoryPressure
|
||||
|
||||
```cpp
|
||||
void OnMemoryPressure(size_t requiredBytes)
|
||||
```
|
||||
|
||||
内存压力回调。当系统内存紧张时调用此方法,从 LRU 列表头部开始驱逐资源,直到释放足够空间。
|
||||
|
||||
**参数:**
|
||||
- `requiredBytes` - 需要释放的字节数
|
||||
|
||||
**返回:** 无
|
||||
|
||||
**复杂度:** O(n)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
// 需要 100MB 空间
|
||||
cache.OnMemoryPressure(100 * 1024 * 1024);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [ResourceCache 总览](resourcecache.md) - 返回类总览
|
||||
Reference in New Issue
Block a user