This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients amaury.forgeotdarc, christian.heimes, gvanrossum, janssen
Date 2007-12-11.00:42:04
SpamBayes Score 0.000221269
Marked as misclassified No
Message-id <475DDCDC.9090306@cheimes.de>
In-reply-to <ca471dc20712101537g1483ae65x940397532df77769@mail.gmail.com>
Content
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
History
Date User Action Args
2007-12-11 00:42:04christian.heimessetspambayes_score: 0.000221269 -> 0.000221269
recipients: + christian.heimes, gvanrossum, amaury.forgeotdarc, janssen
2007-12-11 00:42:04christian.heimeslinkissue1469 messages
2007-12-11 00:42:04christian.heimescreate