ANN.: Beta 1.0 of Weak Reference Extension Module is now available
graham
graham73 at telocity.com
Sat Nov 18 16:11:11 EST 2000
Johann Hibschman
> shindich writes:
>
>> I suspect of two reasons for why Java has weak references:
>> 1. Tracking down circular references is very expensive even for real
>> garbage collectors. Therefore, you might get better performance if you
>> use weak references instead of creating circular references.
>
> But doesn't this come for free with most garbage collection schemes?
> The classic "stop and copy" and "mark and sweep" collectors hangle
> circular refs automatically. I've done a bit of Common Lisp
> programming and have never had trouble with GC performance, even while
> running ugly numerical code.
On top of this more modern collection schemes have no penalty associated
with collecting circular references, in the sense that it is just as easy
to collect non-circular obbject chains as it is circular ones.
Like Johann I find weak references hard to fathom -- at least for their
utility.
graham
More information about the Python-list
mailing list