lebeg commented on a change in pull request #12499: [MXNET-922] Fix memleak in 
profiler
URL: https://github.com/apache/incubator-mxnet/pull/12499#discussion_r217986833
 
 

 ##########
 File path: src/profiler/profiler.h
 ##########
 @@ -455,7 +455,7 @@ class Profiler {
   /*! \brief filename to output profile file */
   std::string filename_ = "profile.json";
   /*! \brief profile statistics consist of multiple device statistics */
-  DeviceStats* profile_stat;
+  std::unique_ptr<DeviceStats[], std::default_delete<DeviceStats[]>> 
profile_stat;
 
 Review comment:
   `std::default_delete<DeviceStats[]>` is default and not needed explicitly, I 
think

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to