Call tp_clear of base unmanaged type by lostmsu · Pull Request #1541 · pythonnet/pythonnet

@lostmsu

…ject instance is cleared

fixes pythonnet#1476 : C# exceptions inherit from Python BaseException class, which has tp_clear. Prior to this change it was not called, leaving dangling references to BaseException.args and BaseException.__cause__.call tp_clear of base unmanaged type when a reflected CLR object instance is cleared

fixes pythonnet#1476 : C# exceptions inherit from Python BaseException class, which has tp_clear. Prior to this change it was not called, leaving dangling references to BaseException.args and BaseException.__cause__.

@lostmsu lostmsu deleted the bugs/MemLeak-CatchingExceptions branch

September 14, 2021 19:18

@lostmsu lostmsu restored the bugs/MemLeak-CatchingExceptions branch

September 14, 2021 19:28

@lostmsu lostmsu deleted the bugs/MemLeak-CatchingExceptions branch

September 14, 2021 19:29