[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] Deallocate QPaintDevice and descendants when worker thread ends
From: Jack Cosgrove <jackcosgrove () gmail ! com>
Date: 2012-01-30 2:05:46
Message-ID: 1327889146.8479.7.camel () fanserver
[Download RAW message or body]
Hi all,
I have an application in which I embed a Python interpreter in a worker
thread, and execute PyQT code using that interpreter. I was having some
issues with memory leaks, so I want to deallocate all PyQT objects
created by the worker thread when the worker thread ends. Using the Qt
memory management system I thought it would be straightforward to assign
the current QThread as the parent to all QObjects, but in the case of
QImage - derived from QPaintDevice - there looks to be no parent
parameter.
The GUI thread which spawns the worker thread contains its own Qt event
loop, so I want to be sure that the lifetime of PyQT objects is
determined by the lifetime of the worker thread and not the GUI thread.
How would I go about deallocating all of the objects derived from
QPaintDevice created by a worker thread when the thread ends?
-Jack
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic