Skip to content

Commit

Permalink
[RUNTIME] Fix memory leakage of TVMByteArray (apache#4856)
Browse files Browse the repository at this point in the history
  • Loading branch information
merrymercy authored and alexwong committed Feb 28, 2020
1 parent 7306114 commit 0f86db6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/tvm/runtime/packed_func.h
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ class TVMRetValue : public TVMPODValue_ {
void Clear() {
if (type_code_ == kTVMNullptr) return;
switch (type_code_) {
case kTVMStr: delete ptr<std::string>(); break;
case kTVMStr: case kTVMBytes: delete ptr<std::string>(); break;
case kTVMPackedFuncHandle: delete ptr<PackedFunc>(); break;
case kTVMNDArrayHandle: {
NDArray::FFIDecRef(static_cast<TVMArrayHandle>(value_.v_handle));
Expand Down

0 comments on commit 0f86db6

Please sign in to comment.