Hi Ilya,

On January 17, 2018 at 3:09:52 PM, Ilya Skriblovsky (ilyaskriblov...@gmail.com) 
wrote:

[Trimmed for context]

So using weakrefs makes all protocol instances and instances of 
TLSMemoryBIOProtocol to be deleted right after a connection is closed. Less 
circular-dependent objects → less GC invocations → better performance. And I 
see much nicer RAM usage pattern in my app.

Is it possible to fix circular deps in some more clean way? Can this be solved 
at all while user's code is able to try to touch both sides of circular dep 
after connection is closed? Please advice


Personally, I don’t mind the weaker approach, but if you wanted to be 
completely explicit, I’d look at modifying the connectionLost method of both 
the protocol and the protocol wrapper to break circular references.

Thanks for consideration

Best regards,
    Ilya

Hope this helps,

Daniel
--
L. Daniel Burr
ldanielb...@me.com
(312) 656-8387


_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to