docs: rebuild Memory API content
This commit is contained in:
@@ -1,31 +1,30 @@
|
||||
# MemoryManager::SetTrackAllocations
|
||||
|
||||
设置相关状态或配置。
|
||||
设置是否跟踪分配。
|
||||
|
||||
```cpp
|
||||
void SetTrackAllocations(bool track);
|
||||
```
|
||||
|
||||
该方法声明于 `XCEngine/Memory/MemoryManager.h`,当前页面用于固定 `MemoryManager` 类目录下的方法级 canonical 路径。
|
||||
## 行为说明
|
||||
|
||||
**参数:**
|
||||
- `track` - 参数语义详见头文件声明。
|
||||
|
||||
**返回:** `void` - 无返回值。
|
||||
|
||||
**示例:**
|
||||
当前实现只做一件事:
|
||||
|
||||
```cpp
|
||||
#include <XCEngine/Memory/MemoryManager.h>
|
||||
|
||||
void Example() {
|
||||
XCEngine::Memory::MemoryManager object;
|
||||
// 根据上下文补齐参数后调用 MemoryManager::SetTrackAllocations(...)。
|
||||
(void)object;
|
||||
}
|
||||
m_trackAllocations = track;
|
||||
```
|
||||
|
||||
它不会创建追踪器、不会改变 `ProxyAllocator` 行为,也不会影响 `DumpMemoryLeaks()` 或 `GenerateMemoryReport()` 的输出内容。
|
||||
|
||||
## 参数
|
||||
|
||||
- `track` - 要保存的跟踪开关值。
|
||||
|
||||
## 返回值
|
||||
|
||||
- 无。
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [返回类总览](MemoryManager.md)
|
||||
- [返回模块目录](../Memory.md)
|
||||
- [返回类型总览](MemoryManager.md)
|
||||
- [DumpMemoryLeaks](DumpMemoryLeaks.md)
|
||||
|
||||
Reference in New Issue
Block a user