File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -58,8 +58,13 @@ cdef class SSLProtocol:
5858 object _incoming_write
5959 object _outgoing
6060 object _outgoing_read
61+
62+ # Buffer for the underlying UVStream buffered reads
6163 bytearray _plain_read_buffer
64+ # Buffer for SSLObject.read calls
65+ # Only allocated when user pass non-buffered Protocol instance
6266 bytearray _ssl_read_buffer
67+ # Cached long object for SSLObject.read calls
6368 object _ssl_read_max_size_obj
6469
6570 SSLProtocolState _state
Original file line number Diff line number Diff line change @@ -348,6 +348,12 @@ cdef class SSLProtocol:
348348 self ._loop.call_soon(self ._app_protocol.connection_lost, exc)
349349 self ._set_state(UNWRAPPED)
350350 self ._transport = None
351+
352+ # Decrease ref counters to user instances to avoid cyclic references
353+ # between user protocol, SSLProtocol and SSLTransport.
354+ # This helps to deallocate useless objects asap.
355+ # If not done then some tests like test_create_connection_memory_leak
356+ # will fail.
351357 self ._app_transport = None
352358 self ._app_protocol = None
353359 self ._app_protocol_get_buffer = None
You can’t perform that action at this time.
0 commit comments