提交 94b58a29 编写于 作者: L liaogang

Follow comments

上级 d8560ec2
......@@ -30,8 +30,7 @@ std::once_flag cpu_allocator_flag;
std::once_flag gpu_allocator_flag;
BuddyAllocator* GetCPUBuddyAllocator() {
static std::unique_ptr<BuddyAllocator, void (*)(BuddyAllocator*)> a{
nullptr, [](BuddyAllocator* p) { delete p; }};
static std::unique_ptr<BuddyAllocator> a{nullptr};
std::call_once(cpu_allocator_flag, [&]() {
a.reset(new BuddyAllocator(new detail::CPUAllocator,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册