
On Thu, Jan 02, 2003, Max Ischenko wrote:
Aahz wrote:
Tim Peters:
The language reference manual doesn't promise that any garbage will be collected, ever. So, no, "supposed to" doesn't apply.
Thanks. I'll tell people to run gc.collect() at the end of their applications if they care.
Why? When application exits the OS would reclaim it's memory pages anyway.
Because garbage cycles can point at non-garbage; when the garbage is reclaimed, __del__() methods will run. You could argue that this is another reason against using __del__(), but since this is part of the way CPython works, I'm documenting it in my book. -- Aahz (aahz@pythoncraft.com) <*> http://www.pythoncraft.com/ "There are three kinds of lies: Lies, Damn Lies, and Statistics." --Disraeli