Am 08.06.2012 18:02, schrieb Steve:
> Well, I guess I was confused by the terminology. I thought there were
> leaked objects _after_ a garbage collection had been run (as it said
> "collecting generation 2"). Also, "unreachable" actually appears to mean
> "unreferenced". You live n learn...
Actual
On Fri, Jun 8, 2012 at 10:02 AM, Steve wrote:
> Well, I guess I was confused by the terminology. I thought there were leaked
> objects _after_ a garbage collection had been run (as it said "collecting
> generation 2").
That means that it's going to check all objects. The garbage
collector divide
"John Gordon" wrote in message news:jqr3v5$src$1...@reader1.panix.com...
I'm unfamiliar with gc output, but just glancing over it I don't see
anything that looks like a leak. It reported that there were 19 objects
which are unreachable and therefore are candidates for being collected.
What mak
For comparison, here is what a leaking program would look like:
class Foo(object):
def __init__(self, other=None):
if other is None:
other = Foo(self)
self.other = other
def __del__(self):
pass
import gc
gc.set_debug(gc.DEBUG_STATS | gc.DEBUG_LEAK)
f
On Thu, Jun 7, 2012 at 12:48 PM, Steve wrote:
> The leaks can be removed by uncommenting both lines shown.
That's just a matter of timing. You call the function before you call
set_debug, so when you uncomment the lines, the garbage collector is
explicitly run before the debug flags are set. Wh
In "Steve" writes:
> gc: objects in each generation: 453 258 4553
> gc: collectable
> gc: collectable
> gc: collectable
> gc: collectable <_Link 02713300>
> gc: collectable
> gc: collectable
> gc: collectable
> gc: collectable <_Link 02713350>
> gc: collectable
> gc: collectable
> gc: co
When I run this program:
import configparser, sys, gc
def test():
config=configparser.ConfigParser()
#del(config)
#gc.collect()
test()
sys.stderr.write(sys.version)
gc.set_debug(gc.DEBUG_LEAK|gc.DEBUG_STATS)
It reports:
3.2.3 (default, Apr 11 2012, 07:15:24) [MSC v.1500 32 bit (Intel)]