737 B
737 B
ProxyAllocator::Constructor
构造一个代理分配器。
ProxyAllocator(IAllocator* underlying, const char* name);
行为说明
当前构造函数只做成员保存:
m_underlying = underlyingm_name = name
它不会复制名称字符串,也不会接管底层分配器所有权。
参数
underlying- 被代理的底层分配器。name- 代理名称。
返回值
- 无。
当前实现限制
- 不校验
underlying是否为空。 - 不复制
name内容,只保存原始指针。 - 调用方必须保证底层分配器和名称字符串在
ProxyAllocator生命周期内保持有效。