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:
29
docs/api/memory/linear-allocator/~linear-allocator.md
Normal file
29
docs/api/memory/linear-allocator/~linear-allocator.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# LinearAllocator::~LinearAllocator
|
||||
|
||||
```cpp
|
||||
~LinearAllocator() override;
|
||||
```
|
||||
|
||||
销毁线性分配器,释放预分配的缓冲区。如果提供了 `parent` 分配器,则使用它释放缓冲区;否则使用系统默认释放(`::operator delete`)。
|
||||
|
||||
**参数:** 无
|
||||
|
||||
**返回:** 无
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Memory/LinearAllocator.h>
|
||||
|
||||
{
|
||||
LinearAllocator allocator(1024 * 1024);
|
||||
void* ptr = allocator.Allocate(256);
|
||||
// ... 使用 allocator
|
||||
} // 析构时自动释放 1MB 缓冲区
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [LinearAllocator 总览](linear-allocator.md) - 返回类总览
|
||||
Reference in New Issue
Block a user