You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2017/12/14 17:52:36 UTC

[GitHub] larroy commented on a change in pull request #8872: Minor refactor: prevent string copying, list -> vector, shared_ptr by?

larroy commented on a change in pull request #8872: Minor refactor: prevent string copying, list -> vector, shared_ptr by?
URL: https://github.com/apache/incubator-mxnet/pull/8872#discussion_r157016309
 
 

 ##########
 File path: src/engine/thread_pool.h
 ##########
 @@ -58,8 +57,8 @@ class ThreadPool {
 
     /*! \brief Signal event upon destruction, even for exceptions (RAII) */
     struct SetReadyOnDestroy {
-      explicit inline SetReadyOnDestroy(std::shared_ptr<SimpleEvent> *event)
-        : event_(*event) {
+      explicit inline SetReadyOnDestroy(const std::shared_ptr<SimpleEvent>& event)
 
 Review comment:
   general practice is to pass shared pointers by reference to prevent copies and in this case the pointer to shared pointer could be null and is not being checked.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services