29 Dec
2002
29 Dec
'02
10:45 p.m.
[Originally posted to comp.lang.python with no response; asking here before filing a bug report] Is garbage collection supposed to run when Python exits? The following program does not print any output, unless I uncomment the gc.collect() (or add a for loop that forces GC after creating the cycle): import gc class A: pass class B: def __del__(self): print "Bye-bye!" a = A() b = A() a.b = b b.a = a a.x = B() del a del b #gc.collect() -- Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/ "I disrespectfully agree." --SJM
7755
Age (days ago)
7759
Last active (days ago)
11 comments
8 participants
participants (8)
-
"Martin v. Löwis"
-
Aahz
-
Alex Martelli
-
Greg Ward
-
Guido van Rossum
-
Max Ischenko
-
pinard@iro.umontreal.ca
-
Tim Peters