Skip to content

Commit

Permalink
[RUNTIME] Fix memory leakage of TVMByteArray
Browse files Browse the repository at this point in the history
  • Loading branch information
merrymercy committed Feb 11, 2020
1 parent b7364b4 commit eed8a61
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 eed8a61

Please sign in to comment.