Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b20e9db

Browse files
committed
Remove reference cycle breaking code. The GC now takes care of it.
1 parent 88c761a commit b20e9db

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

Lib/test/test_generators.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,6 @@
484484
A->A B->G C->A D->G E->G F->A G->G H->G I->A J->G K->A L->A M->G
485485
merged A into G
486486
A->G B->G C->G D->G E->G F->G G->G H->G I->G J->G K->G L->G M->G
487-
>>> for s in sets: # XXX memory leak without this
488-
... s.clear()
489487
"""
490488

491489
# Fun tests (for sufficiently warped notions of "fun").
@@ -614,7 +612,7 @@
614612
... yield i
615613
616614
Print as many of these as you like -- *this* implementation is memory-
617-
efficient. XXX Except that it leaks unless you clear the dict!
615+
efficient.
618616
619617
>>> m235 = LazyList(m235())
620618
>>> for i in range(5):
@@ -625,8 +623,6 @@
625623
[200, 216, 225, 240, 243, 250, 256, 270, 288, 300, 320, 324, 360, 375, 384]
626624
[400, 405, 432, 450, 480, 486, 500, 512, 540, 576, 600, 625, 640, 648, 675]
627625
628-
>>> m235.clear() # XXX memory leak without this
629-
630626
631627
Ye olde Fibonacci generator, LazyList style.
632628
@@ -650,8 +646,6 @@
650646
>>> fib = LazyList(fibgen(1, 2))
651647
>>> firstn(iter(fib), 17)
652648
[1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584]
653-
654-
>>> fib.clear() # XXX memory leak without this
655649
"""
656650

657651
# syntax_tests mostly provokes SyntaxErrors. Also fiddling with #if 0

0 commit comments

Comments
 (0)