Files
XCSDD/docs/api/memory/manager/dump-memory-leaks.md
ssdfasd 58a83f445a 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
2026-03-19 12:44:08 +08:00

636 B

MemoryManager::DumpMemoryLeaks

void DumpMemoryLeaks();

输出当前未释放的内存分配信息。如果启用了内存跟踪,此方法会遍历所有记录并报告疑似泄漏的分配。应在程序退出前调用,以便发现资源泄漏。

参数:

返回:

复杂度: O(n)

示例:

#include <XCEngine/Memory/MemoryManager.h>

MemoryManager::Get().Initialize();

// ... 程序运行 ...

// 程序退出前检查泄漏
MemoryManager::Get().DumpMemoryLeaks();
MemoryManager::Get().Shutdown();

相关文档