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:
2026-03-19 12:44:08 +08:00
parent e003fe6513
commit 58a83f445a
1012 changed files with 56880 additions and 22 deletions

View File

@@ -0,0 +1,35 @@
# LinearAllocator::Free
```cpp
void Free(void* ptr) override;
```
此方法对 LinearAllocator 无实际效果。线性分配器不支持单个内存块的释放,因为内存是顺序分配的,释放中间某块会破坏后续分配的完整性。需要释放所有内存时使用 `Clear()` 方法。
**参数:**
- `ptr` - 被忽略
**返回:**
**复杂度:** O(1)(空操作)
**示例:**
```cpp
#include <XCEngine/Memory/LinearAllocator.h>
LinearAllocator allocator(1024);
void* ptr = allocator.Allocate(256);
void* ptr2 = allocator.Allocate(128);
// Free 实际上什么都不做
allocator.Free(ptr);
allocator.Free(ptr2);
// 如需释放所有内存,应使用 Clear
allocator.Clear();
```
## 相关文档
- [LinearAllocator 总览](linear-allocator.md) - 返回类总览