tqchen commented on a change in pull request #6456:
URL: https://github.com/apache/incubator-tvm/pull/6456#discussion_r487311828



##########
File path: include/tvm/auto_scheduler/cost_model.h
##########
@@ -70,6 +70,11 @@ class CostModelNode : public Object {
     LOG(FATAL) << "Not implemented";
   }
 
+  /*!
+   * \brief Default virtual destructor
+   */
+  virtual ~CostModelNode() {}

Review comment:
       The default v-destructor is not necessary for a sub-class of object, 
because they are created by make_object, and the destructor is stored there.  
https://github.com/apache/incubator-tvm/blob/master/include/tvm/runtime/memory.h#L74
   
   The `Wdelete-non-virtual-dtor` already covers that case and will create a 
warning if an object is created using other methods (e.g. new) but deleted via 
virtual destructor. Right now the code base is free of that warning.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to