[Python-checkins] r43092 - in python/trunk: Lib/test/leakers/test_ctypes.py Misc/build.sh
Neal Norwitz
nnorwitz at gmail.com
Fri Mar 17 08:18:11 CET 2006
On 3/16/06, Thomas Heller <theller at python.net> wrote:
> > +def leak():
> > + class POINT(Structure):
> > + _fields_ = [("x", c_int)]
> > + class RECT(Structure):
> > + _fields_ = [("ul", POINT)]
> >
>> I'm still wondering: Is this a bug, and where is it? Creating (new-style) classes in a loop
> leaks references, this does not look ctypes-specific.
Hmmm, you're right this doesn't leak (after calling gc.collect()). I
thought I had a condition where it really did leak.
Ok, I copied the wrong code. I updated the file with code that really
does leak. I also call gc.collect() since the code above (and the new
code) generates some cycles.
n
More information about the Python-checkins
mailing list