diff options
author | Tim Peters <tim.peters@gmail.com> | 2003-04-05 18:40:50 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2003-04-05 18:40:50 (GMT) |
commit | f6ae7a43eb781f2922309278d8005415e507ad28 (patch) | |
tree | aab06f53e6b8a16e95af4a4f58fadbcbe7120e14 /Lib | |
parent | 2f74fddfc1bd81838cb80e726d391f4c810e525a (diff) | |
download | cpython-f6ae7a43eb781f2922309278d8005415e507ad28.zip cpython-f6ae7a43eb781f2922309278d8005415e507ad28.tar.gz cpython-f6ae7a43eb781f2922309278d8005415e507ad28.tar.bz2 |
move_finalizers(): Rewrote. It's not necessary for this routine
to special-case classic classes, or to worry about refcounts;
has_finalizer() deleted the current object iff the first entry in
the unreachable list has changed. I don't believe it was correct
to check for ob_refcnt == 1, either: the dealloc routine would get
called by Py_DECREF then, but there's nothing to stop the dealloc
routine from ressurecting the object, and then gc would remain at
the head of the unreachable list despite that its refcount temporarily
fell to 0 (and that would lead to an infinite loop in move_finalizers()).
I'm still worried about has_finalizer() resurrecting other objects
in the unreachable list: what's to stop them from getting collected?
Diffstat (limited to 'Lib')
0 files changed, 0 insertions, 0 deletions