Python vs Ruby
Martin von Loewis
loewis at informatik.hu-berlin.de
Fri Jan 26 12:21:32 EST 2001
Yukihiro Matsumoto <matz at zetabits.com> writes:
> The leaks I meant were two fold:
>
> * circluar references
> * wrong ref-counted objects, mostly by extension bugs.
>
> The former disappeared in Python 2.0. But the latter still remain.
> Correct me if I'm wrong.
That's right. In addition, the following kinds of objects still leak
in 2.0:
- instance objects participating in a cycle whose class has an __del__
(they are added to gc.garbage, since finalization behaviour is unclear)
- cycles involving C objects (i.e. custom type instances) whose type
implementations have not been updated to support the GC. Such types
are rare, since C extensions typically act as holder of some external
resource, not as holders of Python objects.
> |I don't know how exactly GC works in Ruby - it is likely that
> |it suffers from things that people would consider as drawbacks, though.
>
> Maybe, maybe not.
So I shall find some time to study its weaknesses :-)
Regards,
Martin
More information about the Python-list
mailing list