Lunderberg commented on PR #17190:
URL: https://github.com/apache/tvm/pull/17190#issuecomment-2248127617

   I think I agree with @tqchen here.  The `TVMObjectFree` function internally 
checks whether the handle is a nullptr, so setting `dref.handle = None` would 
not cause a segfault.  Since no C++ object would have its reference count 
decremented, setting `dref.handle = None` would have the same desired result of 
removing the ownership of `dref.handle` from `dref`.
   
   If there are other use cases of `del my_obj.handle`, then we probably should 
still add it to the cython definition, but it could be just a wrapper for 
`my_obj.handle = None`.


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

Reply via email to