-
Notifications
You must be signed in to change notification settings - Fork 150
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
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 |
I agree the |
I finally had some time to look at this closely. I added a test to see if equals is leaking and found it is not leaking, I just didn't notice the |
Good catch. I'm good with this going in. |
This is a fix for the problem identified in #538.