cjolivier01 commented on issue #8737: Use RAII and fix Coverity resource leaks 
#10371 and others
URL: https://github.com/apache/incubator-mxnet/pull/8737#issuecomment-346571223
 
 
   Note that SimpleBind tends to be called once, so a shared pointer and its
   atomic counter isnt going to affect performance.
   
   On Wed, Nov 22, 2017 at 2:55 PM Pedro Larroy <notificati...@github.com>
   wrote:
   
   > *@larroy* commented on this pull request.
   > ------------------------------
   >
   > In cpp-package/example/alexnet.cpp
   > <https://github.com/apache/incubator-mxnet/pull/8737#discussion_r152696303>
   > :
   >
   > > @@ -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);
   >
   > Thanks. I will bring it up on the list. About shared_ptr: since you can
   > create it yourself by moving from the unique_ptr if you need a shared_ptr,
   > shouldn't be a big issue. Actually faster to not create a shared_ptr if not
   > needed, as it doesn't need the atomic refcount machinery.
   >
   > ?
   > You are receiving this because you commented.
   > Reply to this email directly, view it on GitHub
   > 
<https://github.com/apache/incubator-mxnet/pull/8737#discussion_r152696303>,
   > or mute the thread
   > 
<https://github.com/notifications/unsubscribe-auth/AKts_QpC2ug4w3HnWTmXjlrxvXqAVH-Gks5s5KZIgaJpZM4QlIUN>
   > .
   >
   

----------------------------------------------------------------
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