You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/08/20 01:52:48 UTC

[GitHub] [tvm] khionu commented on a change in pull request #8725: [Rust] Fix memory leak #2

khionu commented on a change in pull request #8725:
URL: https://github.com/apache/tvm/pull/8725#discussion_r692601685



##########
File path: rust/tvm-rt/src/function.rs
##########
@@ -113,8 +114,11 @@ impl Function {
     /// Calls the function that created from `Builder`.
     pub fn invoke<'a>(&self, arg_buf: Vec<ArgValue<'a>>) -> Result<RetValue> {
         let num_args = arg_buf.len();
-        let (mut values, mut type_codes): (Vec<ffi::TVMValue>, Vec<ffi::TVMArgTypeCode>) =
-            arg_buf.into_iter().map(|arg| arg.to_tvm_value()).unzip();
+        let (mut values, mut type_codes): (Vec<ffi::TVMValue>, Vec<ffi::TVMArgTypeCode>) = arg_buf
+            .clone()

Review comment:
       I don't see this value being reused later?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org