win32 file locking

Andrew Bennetts andrew at
Wed May 25 07:52:54 BST 2005

On Wed, May 25, 2005 at 01:36:05AM -0500, John A Meinel wrote:
> Andrew Bennetts wrote:
> >
> >There's a compromise that might be helpful.  Twisted recently removed the
> >__del__ method on its Deferred objects, and instead moved the __del__ into 
> >a
> >sub-object that unless someone is being naughty, should never be in a
> >cycle by virtue of never being referenced from anywhere by the Deferred.
> >
> >
> But it doesn't matter because the parent still holds a reference to the
> DebugInfo, and if the parent is in a cycle, then it will never be
> cleaned up, which means that self._debugInfo will also never be cleaned up.

It does work -- the cycle is collectable, because there's no object with a
__del__ in the cycle.  There happens to be an object with a __del__
reachable from the cycle, but that case works.  Here's a post from Tim
Peters explaining in a little more detail:


More information about the bazaar mailing list