Re: [Python-Dev] Reference leak in thread._local

2008-08-27 Thread Aahz
On Wed, Aug 27, 2008, [EMAIL PROTECTED] wrote: > > I noticed that thread._local can leak references if objects are > being stored inside the thread._local object whose destructors > might release the GIL. Please post this bug report & patch to bugs.python.org -- otherwise, it will almost certainly

[Python-Dev] Reference leak in thread._local

2008-08-27 Thread Ben . Cottrell
I noticed that thread._local can leak references if objects are being stored inside the thread._local object whose destructors might release the GIL. The way this happens is that in Modules/threadmodule.c, in the _ldict() function, it does things like this: Py_CLEAR(self->dict);