Python vs Java garbage collection?

"Martin v. Löwis" martin at v.loewis.de
Mon Dec 23 00:47:49 EST 2002


Paul Foley wrote:
> The "entire rationale behind garbage collection" is to present you
> with the illusion that your computer has infinite memory.  If it
> actually *had* infinite memory, garbage collection would be a no-op.
> Where would your finalizers be then?

People often extend this rationale to "your computer has infinite 
resources". Closing a file is then not necessary since you can have as 
many open files as you want to, and finalizers wouldn't be needed for that.

Regards,
Martin




More information about the Python-list mailing list