| Jeff Robbins 2006-10-19, 1:12 pm |
| Yes regarding placement of PyThreadState_Clear...sorry about that. I
rebuilt and ran my simple test and it shows no leaks.
static void release_interpreter(void)
{
PyThreadState *tstate = PyThreadState_Get();
// JSR
PyThreadState_Clear(tstate);
#ifdef WITH_THREAD
PyEval_ReleaseThread(tstate);
#else
PyThreadState_Swap(NULL);
#endif
PyThreadState_Delete(tstate);
}
----- Original Message -----
From: "Graham Dumpleton" <grahamd@dscpl.com.au>
To: <python-dev@httpd.apache.org>
Cc: "Jeff Robbins" <jeffr@livedata.com>
Sent: Thursday, October 19, 2006 7:53 AM
Subject: Re: two mod_python leaks
> Comments below.
>
> On 19/10/2006, at 8:55 PM, Graham Dumpleton wrote:
>
>
> Still looking at this, but where you do it looks to be wrong. The
> documentation
> below for PyThreadState_Clear() says:
>
> The interpreter lock must be held.
>
> Where you are calling that function, it isn't. It may need to be moved to
> before
> the call to PyEval_ReleaseThread(). Yes/No?
>
>
> Graham
>
|