__del__ problem - would adopting Garbage Collection fix this?

Just van Rossum just at letterror.com
Thu Apr 20 02:16:45 EDT 2000


>"Warren Postma" <embed at geocities.com> writes:
>> My questions:
>>
>> 1. Shouldn't freeing modules in Py_Finalize be in the reverse order
>> of the way in which the modules were created?  Could a
>> module-destruction order be explicitly maintained by the system?
>
At 10:15 PM +0100 19-04-2000, Michael Hudson wrote:
>It's not clear that that would help; I'd bet I could come up with a
>counter example if I was feeling twisted enough.
>
>> 2. Is this convincing proof, or not, that Garbage Collection would
>> be a Good Thing.
>
>I don't think so.  You still have to destroy things; true gc might
>help I suppose, but I'm fairly sure it doesn't solve the problem
>completely.

I'm not sure if I understood it correctly, but I think the newly proposed
garbage collector does *not* call __del__ if the object in question is part
of a cycle. It seems indeed impossible to do so correctly. I think the site
explained quite well why this is, but I can't seem to repeat it off the top
of my head.

Just






More information about the Python-list mailing list