Turn off cycle detection at runtime?
Aahz
aahz at pythoncraft.com
Sun Dec 29 16:56:26 EST 2002
In article <aun8p6$9df$02$1 at news.t-online.com>,
=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?= <martin at v.loewis.de> wrote:
>
>Even under normal circumstances, the collector will be invoked rarely:
>every 1000 new objects, a generation 1 collection is initiated. In an
>application that does not create cycles, many objects will die before gc
>is invoked, so they don't count towards the 1000 objects.
Nitpick/clarification: In CPython 2.2.2, the collector for generation0
gets run when 700 more objects have been created than deleted.
IOW, this will not run the collector:
class C: pass
for i in range(701):
x = C()
But this will run the collector:
class C: pass
L = []
for i in range(701):
L.append(C())
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"I disrespectfully agree." --SJM
More information about the Python-list
mailing list