提交 609e9704 编写于 作者: C Charles0429 提交者: wangzelin.wzl

[CP] fix memory leak of cuckoo hashmap

上级 4e898ddb
......@@ -792,6 +792,12 @@ int ObCuckooHashMap<_key_type, _value_type, _hashfunc, _equal>::overflow_set(
overflow_array_ = new_overflow_array;
overflow_capacity_ = overflow_capacity_ + OVERFLOW_EXPAND_COUNT;
done = true;
} else {
for (int64_t i = 0; i < overflow_capacity_ + OVERFLOW_EXPAND_COUNT; ++i) {
new_overflow_array[i].~pair_type();
}
allocator_->free(new_overflow_array);
new_overflow_array = nullptr;
}
}
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册