[Python-Dev] funny leak
Mon, 24 Mar 2003 12:51:40 -0500
>> This seems to be all it takes:
> Your patch isn't a 100% fix, since a reference can still be leaked if
> the PyDict_SetItem fails.
The patch I checked in paid attention to that.
> If nobody beats me to it, I can do a validation pass
> through compile.c and see how many I can squash.
> A quick eyeballing suggests there are a bunch more of these, but only
> on error returns.
Possibly. If a dict setitem call fails, it's almost certainly because we're
out of memory, and the program is going to die soon regardless. How much
pain it's worth to die with a refcount that's not one too large is open to