You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/02/20 21:41:00 UTC

[GitHub] [tvm] junrushao1994 commented on a change in pull request #7481: Fix stack overflow when partially-__init__ Node raises exception.

junrushao1994 commented on a change in pull request #7481:
URL: https://github.com/apache/tvm/pull/7481#discussion_r579712698



##########
File path: python/tvm/_ffi/_ctypes/object.py
##########
@@ -106,6 +106,11 @@ class ObjectBase(object):
 
     def __del__(self):
         if _LIB is not None:
+            try:
+                handle = self.handle

Review comment:
       We can use hasattr(self, “handle”)




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