Memory leak in PyQt application

Alexander Eisenhuth newsuser at
Thu Jun 28 19:21:36 CEST 2007

Hello alltogether,

My System:

Python 2.5.1
Qt 4.2.2
SIP 4.6
PyQt 4.2

I've a memory leak in a PyQt application and no idea how to find it. What 
happens in the application ?

 From QWindow a QDialog is called on a button "pressed()" signal, that 
instantiate a QThread and waits for it. If the thread has finished, the QDialog 

I've stipped down everything that nothing more happens (to me obviously). 
Boost.Python is used to wrap a C++ Lib (used in the thread). Every time memory 
usage increases for ~70 KB.

Sometimes the application crash on closing QWindow. (QtCore.dll)

- One thing I ask me is weather garbage collection is done in the PyQt main loop?

What hints do you have to find the leak?

Help is very very welcome


More information about the Python-list mailing list