-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix leaking attributes in java PyObject. #539
base: dev_4.2
Are you sure you want to change the base?
Fix leaking attributes in java PyObject. #539
Conversation
Wait, it seems necessary to check that if (pyAttr) {
Py_DECREF(pyAttr);
} or Py_XDECREF(pyAttr); |
jobject_as_PyObject() only returns null when the python exception is set so the check for process_py_exception() ensures that |
Ok, so |
Anytime the python exception is set from jobject_as_PyObject() it will return null so in the case it does not hit the new DECREF it will be null and does not need a DECREF. |
Okay, I'm not very familiar with Python's C interface. I was just considering whether we need to maintain consistency with the rest of the code, such as |
It looks to me like |
This is a fix for the problem identified in #538.