[PyQt] Attempting to reduce the memory footprint of my PyQt5 application

Xavion xavion.0 at gmail.com
Sat Sep 17 08:37:04 BST 2016


Yes, I can confirm that there's no leak when it's called in that fashion.
However, there is one when the timer is (re)called from within a loop.
I've just posted a new comment to the ticket
<http://bugs.python.org/issue28165> and attached code/output samples
(there) to illustrate my point.

While we're there, I found another leak in my program (manually).  It's to
do with overwriting of icons that are attached to widgets in memory.
Specifically,
I'm talking about the *QMainWindow* and *QSystemTrayIcon* classes.  I'm
sure there are other cases; I just haven't looked for them.

Each time I give either one of those a new icon (at runtime), my memory
footprint increases proportionately.  Trying to suck the old icon out first
and deleting it manually doesn't help.  Is Qt or PyQt likely to blame for
this lack of automatic cleanup, and how easy would it be to fix?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160917/eaf3e86a/attachment-0001.html>


More information about the PyQt mailing list