Skip to content

Commit 1897d1b

Browse files
jcwchengramalingam
andauthored
delete useless Value to prevent memory leak (onnx#3760)
Signed-off-by: Chun-Wei Chen <jacky82226@gmail.com> Co-authored-by: G. Ramalingam <grama@microsoft.com>
1 parent a56a110 commit 1897d1b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

onnx/common/ir.h

+1
Original file line numberDiff line numberDiff line change
@@ -1212,6 +1212,7 @@ friend struct Value;
12121212
void freeValue(Value * v) {
12131213
auto it = all_values.find(v);
12141214
ONNX_ASSERT(it != all_values.end());
1215+
delete *it;
12151216
all_values.erase(it);
12161217
}
12171218
};

0 commit comments

Comments
 (0)