Files
XCSDD/docs/api/containers/hashmap/setallocator.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

581 B

HashMap::SetAllocator

void SetAllocator(Memory::IAllocator* allocator);

设置哈希表的内存分配器。

参数:

  • allocator - 内存分配器指针,可以为 nullptr(使用默认分配器)

返回:

复杂度: O(1)

示例:

XCEngine::Containers::HashMap<int, const char*> map;

// 设置自定义分配器(如果使用内存分配器接口)
// map.SetAllocator(customAllocator);

相关文档