[Python-Dev] Re: Pre-existing bug of the millennium (so far) (original) (raw)

Jim Fulton jim at zope.com
Thu Oct 28 13:36:35 CEST 2004


Tim Peters wrote: ...

Anyone have a bright idea? It's remarkable how long we've managed to go without noticing that everything is disastrously broken here <0.9 wink>.

Sure. Clearing cyclic trash can call Python code. If there are weakrefs to any of the cyclic trash, then those wekrefs can be used to resurrect the objects. Therefore, before clearing cyclic trash, we need to remove any weakrefs. If any of the weakrefs being removed have callbacks, then we need to save the callbacks and call them after all of the weakrefs have been cleared.

Jim

-- Jim Fulton mailto:jim at zope.com Python Powered! CTO (540) 361-1714 http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org



More information about the Python-Dev mailing list