Christian Heimes added the comment: Guido van Rossum wrote: > Guido van Rossum added the comment: > > I wonder if Christian Heimes was correct that the ssl object needs GC > support? This was part of his patch (which I checked in and then > reverted because the other part of it didn't work as advertised). > > Alternatively, if 's' is involved in a cycle *and* any of the objects > in the cycle has a __del__ method, the GC won't call __del__. This > seems counter-intuitive but is actually correct since __del__ can only > be called when there are no references to an object left.
A combination of GC support and the removal of __del__ from SSLSocket has fixed the reference leak problem for me. I tried to move the _real_clean() call to PySSL_dealloc but it wasn't as easy as I thought. The code contains a reference cycle. ssl.SSLSocket() contains a reference to PySSLObject and PySSLObject->Socket is a reference to the same ssl.SSLSocket instance. Christian __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1469> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com