<html><body><div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt; color: #000000"><div>Hi,<br><br>I've been reading the mail thread from September 2019 concerning "Possible memory leak with signal connections". The last mail from this thread is this one:<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><a href="https://www.riverbankcomputing.com/pipermail/pyqt/2019-September/042180.html">https://www.riverbankcomputing.com/pipermail/pyqt/2019-September/042180.html</a><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>The mail ends like this:<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><em><span style="color: rgb(128, 128, 128);" data-mce-style="color: #808080;">> [Phil] Are you expecting that the Python interpreter will return unused memory</span></em><br><em><span style="color: rgb(128, 128, 128);" data-mce-style="color: #808080;">to the operating system?</span></em><br><br><em><span style="color: rgb(128, 128, 128);" data-mce-style="color: #808080;">> [Kevin] My assumption was that the memory usage from the signal connections wouldn't "build up" (i.e. that memory usage would be independent of the number of SignalObjects instantiated), which seems to be what happens with the pyqtSlot decorated version. In create_slot_objects, each SlotObject is instantiated, which connects the signals, and then should be immediately garbage collected, which should disconnect the signals. In the version of the script without the pyqtSlot decorators, the number reported for "Memory after slot objects creation" is proportional to the number of SlotObject instances created, which is why I'd assumed memory had leaked, but I could certainly be thinking through things wrong.</span></em><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>I would like to know how the story ends. Is this an actual memory leak? Or is it *just* the Python interpreter keeping the unused memory to itself?<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>I've got some more questions regarding properly "destroying" QtObject()s and their signals. If you have time, please have a look here: <a href="https://stackoverflow.com/questions/65953772/will-the-following-code-disconnect-all-incoming-or-outgoing-pyqt-signals">https://stackoverflow.com/questions/65953772/will-the-following-code-disconnect-all-incoming-or-outgoing-pyqt-signals</a><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Thank you very much :-)<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Kind regards,<br data-mce-bogus="1"></div><div>Kristof<br data-mce-bogus="1"></div></div></body></html>