-
Bug
-
Resolution: Done
-
P2: Important
-
4.8.0
-
None
-
Found on Symbian while testing native thread support. Confirmed to also be a problem on Windows.
-
6f1efe75dac53377b92d779818b43a34add92f02
If you create a QEventLoop within an adopted native thread, the QThreadData, QEventDispatcher and associated objects will not be deleted on thread exit and will leak.
These conditions occur in the tst_qthread autotest, in the adoptedThreadExec() step.
The issue seems to be that all QObjects in a thread have a ref on the QThreadData. If these refs are not cleared at thread exit, the QThreadData will never be deleted. In this case, QEventLoop is causing a QEventDispatcher to be created, which normally QThread would clean up on exit. But since the QEventDispatcher exists and refs the QThreadData, the QThread never cleans up so the objects exist forever.
- depends on
-
QTBUG-17986 Memory leak when QEventLoop is used with an adopted native thread
-
- Closed
-