Commit b47a1248 by Hu Shiwen Committed by Tianqi Chen

fix TVMRetValue move constructor not clear old value (#144)

* fix TVMRetValue move constructor not clear old value lead to repeat delete

* fix
parent 971e7671
...@@ -318,6 +318,8 @@ class TVMRetValue : public TVMPODValue_ { ...@@ -318,6 +318,8 @@ class TVMRetValue : public TVMPODValue_ {
*/ */
TVMRetValue(TVMRetValue&& other) TVMRetValue(TVMRetValue&& other)
: TVMPODValue_(other.value_, other.type_code_) { : TVMPODValue_(other.value_, other.type_code_) {
other.value_.v_handle = nullptr;
other.type_code_ = kNull;
} }
/*! \brief destructor */ /*! \brief destructor */
~TVMRetValue() { ~TVMRetValue() {
......
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