[PyQt] Debug potential memory leaks

Andreas Pakulat apaku at gmx.de
Wed Apr 8 09:42:15 BST 2015


Hi Phil,

On Tue, Apr 7, 2015 at 9:55 PM, Phil Thompson <phil at riverbankcomputing.com>
wrote:

> On 07/04/2015 8:47 pm, Andreas Pakulat wrote:
>
>> Hi,
>>
>> I'm having a small 'systray' application that monitors a jenkins service
>> and it seems there's some kind of memory leak, especially on MacOSX. After
>> having it run for a while (with the machine going to sleep now and again)
>> it starts eating quite some memory - if I understand top/ActivityMonitor
>> correctly - and amd wondering now how I'd best debug a PyQt application's
>> memory consumption.
>>
>> So what tools do you guys usually use to debug such memory leaks? I've
>> tried valgrind on Linux but there's no good hint there, possibly also due
>> to the way Python works.
>>
>
> You could try a debug version of Python that will track objects. If that
> shows objects are not being collected then it is probably a PyQt problem.
> Otherwise it might be more likely to be a Qt problem.


I'll check that option if I can determine its not my own code hanging on to
objects it shouldn't hang onto anymore...

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150408/7702e13c/attachment.html>


More information about the PyQt mailing list