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/19 23:54:17 UTC

[GitHub] [tvm] areusch commented on pull request #7480: Do not allow exceptions in destructors

areusch commented on pull request #7480:
URL: https://github.com/apache/tvm/pull/7480#issuecomment-782462941


   I know we should not be raising exceptions from `__del__`, but we kinda went down this path and now exceptions raised in `__del__` can serve as a note to the user that they left objects live before terminating the program. in a server setting, that might be important.
   
   in this case, the underlying problem was that a Node subclass did not call super().__init__() straightaway, and then raised an exception. This caused `Object.__del__` to enter a recursive loop because `self.handle` slot was not populated. #7481 makes __del__ robust to missing handle. I prefer we merge that rather than suppress all of these error messages, as it's fairly opinionated of our library that users may not care they are leaking memory


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