A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-November/010418.html below:

[Python-Dev] Weak references

[Python-Dev] Weak references [Python-Dev] Weak referencesGuido van Rossum guido@python.org
Sun, 05 Nov 2000 21:48:47 -0500
[me]
> > - Weak references.  This *is* a PEP, but there's no contents yet.  We
> >   could also try to implement (just) weak dictionaries.

[MAL]
> These already exist... http://www.handshake.de/~dieter/weakdict.html
> 
> mx.Proxy also has an implementation which support weak references.

Thanks.  For Fred to read...

> BTW, are these still needed now that we have GC ?

Yes, definitely.  Weak dicts are sometimes needed for situations where
a regular dict would keep objects alive forever.  E.g. we were made
aware of a "leak" in JPython that could only be fixed with weak dicts:
the Swing wrapper code has a global dict mapping widgets to callback
functions, and this keeps all widgets alive forever.  The Java GC
doesn't destroy the widgets, because they are still referenced from
the dict.  A weak dict solves this problem nicely (if it weren't that
JDK 1.1 doesn't support weak dicts).

--Guido van Rossum (home page: http://www.python.org/~guido/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4