
Dec. 31, 2002
7:40 p.m.
"A leak" in the datetime test turned out to be in the scaffolding that prints the current refcount. Here's a whittled test: import sys lastrc = 0 while True: thisrc = sys.gettotalrefcount() if 1: # change 1 to 0 and there's no leak x = '*' * 10 # This leaks; ditto tuple times int, or list times int print >> sys.stderr, 'total refs:', thisrc, 'delta:', thisrc - lastrc lastrc = thisrc Run that in a debug build, and it leaks one reference per loop trip.
8113
Age (days ago)
8113
Last active (days ago)
0 comments
1 participants
participants (1)
-
Tim Peters