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



##########
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:
       I thought about that but I think hasattr() is slow and this way we only 
enter the slow case when bad things happen




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