Fix exception refcnt by BadSingleton · Pull Request #1402 · pythonnet/pythonnet

added 2 commits

February 26, 2021 13:26
As seen in exceptions.c (from cpython), derived exception classes must
also clean the ExceptionBase members. If we don't, we leak the Python
and C# objects set as the __cause__/Inner (amongst
others) of thrown C# exceptions.

This does not address the serializability of the PythonException class.

Also fix various PythonException (ab)uses.

filmor

lostmsu

@BadSingleton

lostmsu

@BadSingleton

@BadSingleton

@BadSingleton

BadSingleton added a commit to Unity-Technologies/pythonnet that referenced this pull request

Jan 24, 2022
Originally from PR pythonnet#1402. The underlying bug is now fixed, but the tests
are atill applicable.

lostmsu pushed a commit that referenced this pull request

Jan 25, 2022
Originally from PR #1402. The underlying bug is now fixed, but the tests
are atill applicable.