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/2003-November/040300.html below:

[Python-Dev] Making weakref callbacks safe in cyclic gc

[Python-Dev] Making weakref callbacks safe in cyclic gc [Python-Dev] Making weakref callbacks safe in cyclic gcTim Peters tim.one at comcast.net
Mon Nov 17 22:09:17 EST 2003
[Neil Schemenauer]
> A hack you say?  Create a list the references itself (i.e. append
> itself).  Append all the unreachable callbacks to it and remove them
> from the weakrefs.  Put the list in the youngest generation.  The
> next gc should clean it up.

Alas, we don't know we can get enough space for a list, and if we can't
we're stuck.  Maybe Py_FatalError would be OK then, but I'd rather not.  I
think I can abuse the weakref objects themselves to hold "the list", though.
Heh.  Now *that's* a hack <wink>.


More information about the Python-Dev mailing list

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