提交 5371f986 编写于 作者: L liuqi

BUG: memory leak gemm_context_ object(2097840 bytes) in cpu_runtime.h

上级 0381a4d6
......@@ -52,13 +52,13 @@ class CPURuntime {
#ifdef MACE_ENABLE_QUANTIZE
~CPURuntime() {
if (!gemm_context_) {
if (gemm_context_ != nullptr) {
delete static_cast<gemmlowp::GemmContext*>(gemm_context_);
}
}
gemmlowp::GemmContext *GetGemmlowpContext() {
if (!gemm_context_) {
if (gemm_context_ == nullptr) {
gemm_context_ = new gemmlowp::GemmContext();
}
return static_cast<gemmlowp::GemmContext*>(gemm_context_);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册