On Thu, Jun 7, 2012 at 12:48 PM, Steve <n...@spam.com> 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.  When it runs again
later, there are no collectable objects for it to find, as they've
already been collected.  With the lines commented, the garbage
collector doesn't get run until after the set_debug call, so it finds
the collectable objects at that time.  Either way the objects get
collected sooner or later, so I don't see any leaks here.

Cheers,
Ian
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to