cjolivier01 commented on a change in pull request #8737: Use RAII and fix 
Coverity resource leaks #10371 and others
URL: https://github.com/apache/incubator-mxnet/pull/8737#discussion_r152614153
 
 

 ##########
 File path: cpp-package/example/alexnet.cpp
 ##########
 @@ -215,7 +215,7 @@ int main(int argc, char const *argv[]) {
   args_map["label"] = NDArray(Shape(batch_size), ctx);
 
   /*with data and label, executor can be generated automatically*/
-  auto *exec = Net.SimpleBind(ctx, args_map);
+  auto exec = Net.SimpleBind(ctx, args_map);
 
 Review comment:
   Why not use unique_ptr<Executor> rather than a stack variable?  That 
wouldn't change the interface.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to