of the socket wrapper __del__ method. It isn't needed, and it prevents
cyclic structures containing socket objects (primarily on Windows, where
the wrapper is used) from getting garbage-collected. People running
ZEO tests in Zope under Windows are acutely aware of this, as the
test driver prints an ever-growing gc.garbage list after each test.
# Avoid referencing globals here
self._sock = self.__class__._closedsocket()
- def __del__(self):
- self.close()
-
def accept(self):
sock, addr = self._sock.accept()
return _socketobject(sock), addr