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_ {
*/
TVMRetValue(TVMRetValue&& other)
: TVMPODValue_(other.value_, other.type_code_) {
other.value_.v_handle = nullptr;
other.type_code_ = kNull;
}
/*! \brief destructor */
~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