-
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.
-
0ee221b374ffef3657247be4c78e05689e04bef7
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.
- is required for
-
QTBUG-18622 CLONE - Memory leak when QEventLoop is used with an adopted native thread - fix for symbian
-
- Closed
-