07-07-06 12:11 AM
Hi Nicolas
Howcome I didn't see this post in JIRA? I added my comment there. I also did
n't
get email. I just found it in Google.
Anyway, I have an application that was started over a year ago with 3.1.3. W
e
switched to 3.2.8 because we had a requirement to upload files and there was
a
problem that was fixed in that version.
I observed a memory leak in our application under 3.2.8, and found MODPYTHON
-172
on Google. I ran the test program in my first comment on 3.2.8, then tried g
oing
back to 3.1.3 to see if the leak was there too.
This leak seems to be in both 3.1.3 and 3.2.8.
I have added another comment regarding _apachemodule.c, which I include belo
w.
Thanks for your help,
Harold
### ============ Begin Code ==============
Excuse me if this is a dumb question, but I don't know anything about the
Python-C interface.
Is it possible that the code in line 319 of _apachemodule.c (from 3.2.8) is
the
problem?
The code is:
if (key && val)
PyList_Append(pairs, Py_BuildValue("(O,O)", key, val));
Does the object returned by Py_BuildValue() need to be dereferenced?
Something like:
if (key && val) {
PyObject * list_elem = Py_BuildValue("(O,O)", key, val);
if (list_elem)
PyList_Append(pairs, list_elem);
Py_XDECREF(list_elem);
}
========================================
[ Post a follow-up to this message ]
|