summaryrefslogtreecommitdiff
path: root/doc/src/snippets/code/src_script_qscriptengine.cpp
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2011-08-11 13:58:23 +0100
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>2011-08-31 10:17:34 +0100
commit298d7a2032c0c6de06c82afc8e9f7356cb5d7840 (patch)
treeb7dc09a7f0934920c6d03c8e2f383347b464f6d9 /doc/src/snippets/code/src_script_qscriptengine.cpp
parent91096126440aafba22aeb9307cb72135b3156a4c (diff)
downloadqt4-tools-298d7a2032c0c6de06c82afc8e9f7356cb5d7840.tar.gz
Prevent leakage of native window handles
On Symbian, reparenting a native widget causes its native window, and those of all its ancestors, to be destroyed and recreated. Because native window handles cannot be destroyed from the context of CONE event handlers, the destruction is delayed until after control flow returns to the event loop (see QTBUG-4664). However, the pending-destruction native windows are leaked if either of the following happens: a) The application never returns to the event loop. While unlikely in a real app, this situation does happen in Qt autotests, causing a crash in tst_qwidget due to leakage from tst_QWidget::reparentCausesChildWinIdChange(). b) A subsequent reparenting event occurs before control returns to the event loop. This patch prevents the leak by storing the pending-destruction native window handle(s) in a member QList, rather than on the stack as parameters to QWidgetPrivate::_q_delayedDestroy(WId). Task-number: QT-5135 Reviewed-by: Jani Hautakangas
Diffstat (limited to 'doc/src/snippets/code/src_script_qscriptengine.cpp')
0 files changed, 0 insertions, 0 deletions