未验证 提交 2856c2b7 编写于 作者: J Jiaying Zhao 提交者: GitHub

[Mobile][ARM]fix possible memory leak of tensor in CPUContext.test=mobile (#2695)

上级 4300ef75
......@@ -44,15 +44,13 @@ namespace framework {
struct CPUContext {
private:
CPUContext();
virtual ~CPUContext() {}
public:
~CPUContext() {}
static CPUContext* Context() {
static CPUContext* ctx = nullptr;
if (ctx == nullptr) {
ctx = new CPUContext();
}
return ctx;
static CPUContext ctx;
return &ctx;
}
void set_thread_num(int thread_num,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册