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:
39
docs/api/memory/manager/get.md
Normal file
39
docs/api/memory/manager/get.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# MemoryManager::Get
|
||||
|
||||
```cpp
|
||||
static MemoryManager& Get();
|
||||
```
|
||||
|
||||
获取 MemoryManager 单例实例。如果尚未创建则内部构造。此方法是获取内存管理器实例的唯一途径。
|
||||
|
||||
**参数:** 无
|
||||
|
||||
**返回:** MemoryManager 单例引用
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Memory/MemoryManager.h>
|
||||
|
||||
// 获取单例
|
||||
MemoryManager& manager = MemoryManager::Get();
|
||||
|
||||
// 初始化
|
||||
manager.Initialize();
|
||||
|
||||
// 访问系统分配器
|
||||
IAllocator* sysAlloc = manager.GetSystemAllocator();
|
||||
|
||||
// 关闭
|
||||
manager.Shutdown();
|
||||
|
||||
// 多次调用返回同一实例
|
||||
MemoryManager& manager2 = MemoryManager::Get();
|
||||
// manager == manager2 为 true
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [MemoryManager 总览](manager.md) - 返回类总览
|
||||
Reference in New Issue
Block a user