Skip to content

Commit

Permalink
fix byte array leak (dmlc#1679)
Browse files Browse the repository at this point in the history
Co-authored-by: Chao Ma <[email protected]>
  • Loading branch information
VoVAllen and aksnzhy authored Jun 22, 2020
1 parent 558673e commit 90a103e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/dgl/runtime/packed_func.h
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ class DGLRetValue : public DGLPODValue_ {
void Clear() {
if (type_code_ == kNull) return;
switch (type_code_) {
case kStr: delete ptr<std::string>(); break;
case kStr: case kBytes: delete ptr<std::string>(); break;
case kFuncHandle: delete ptr<PackedFunc>(); break;
case kModuleHandle: delete ptr<Module>(); break;
case kObjectHandle: delete ptr<std::shared_ptr<Object> >(); break;
Expand Down

0 comments on commit 90a103e

Please sign in to comment.