Final garbage collection?

Aahz Maruch aahz at netcom.com
Mon Jun 26 17:31:28 EDT 2000


In article <962045446.1993274611 at news.libertysurf.fr>,
Jerome Quelin  <jerome.quelin at insalien.org> wrote:
>
>But, (and the following is taken from perl documentation -man perlobj):
>       When an interpreter thread finally shuts down (usually
>       when your program exits), then a rather costly but
>       complete mark-and-sweep style of garbage collection is
>       performed, and everything allocated by that thread gets
>       destroyed.  This is essential to support Perl as an
>       embedded or a multithreadable language.
>
>I was wondering why Python does not implement such a mechanism, that
>seems to me a Good Thing (tm), because _in final_, every object _is_
>destroyed, either if their reference count is nul or not, since the
>memory is reclaimed by the system.

My memory may be faulty, but IIRC one of the primary reasons for not
doing this is the problems that result from memory allocations done by
extensions, and the possibility of having weird holes in memory.

That said, there *is* work being done on garbage collection, but it most
likely will need to be explicitly called.
--
                      --- Aahz (Copyright 2000 by aahz at netcom.com)

Androgynous poly kinky vanilla queer het    <*>     http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

The best way to get information on Usenet is not to ask a question,
but to post the wrong information.  --Aahz



More information about the Python-list mailing list