tqchen commented on code in PR #606:
URL: https://github.com/apache/tvm-ffi/pull/606#discussion_r3355873447


##########
include/tvm/ffi/object.h:
##########
@@ -319,6 +319,18 @@ class Object {
   static constexpr uint64_t kCombinedRefCountStrongOne = 
details::kCombinedRefCountStrongOne;
   static constexpr uint64_t kCombinedRefCountWeakOne = 
details::kCombinedRefCountWeakOne;
   static constexpr uint64_t kCombinedRefCountBothOne = 
details::kCombinedRefCountBothOne;
+  /*!
+   * \brief Call the object deleter under the non-throwing deleter contract.
+   * \param header The object header whose deleter should be invoked.
+   * \param flags The TVMFFIObjectDeleterFlagBitMask values for this cleanup.
+   * \note TVMFFIObject::deleter MUST NOT throw. This function is noexcept so
+   * a deleter that violates the contract terminates deterministically.
+   */
+  TVM_FFI_INLINE static void CallDeleter(TVMFFIObject* header, int flags) 
noexcept {
+    if (header->deleter != nullptr) {

Review Comment:
   i think in our case, deleter itself is no except, so adding the deleter here 
do not have impact, calling delter as it is in original code is better



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

To unsubscribe, e-mail: [email protected]

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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to