Commit 9b3e83f6 by hlu1 Committed by Tianqi Chen

Memory leak in the relay interpreter (#3448)

parent b05dc12f
...@@ -299,7 +299,9 @@ class Interpreter : ...@@ -299,7 +299,9 @@ class Interpreter :
auto closure = ClosureNode::make(captured_mod, func); auto closure = ClosureNode::make(captured_mod, func);
auto mut_closure = auto mut_closure =
static_cast<ClosureNode*>(const_cast<Node*>(closure.get())); static_cast<ClosureNode*>(const_cast<Node*>(closure.get()));
mut_closure->env.Set(letrec_name, closure); if (letrec_name.defined()) {
mut_closure->env.Set(letrec_name, closure);
}
return std::move(closure); return std::move(closure);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment