aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlworkerscript
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-09-30 18:06:57 +0200
committerUlf Hermann <ulf.hermann@qt.io>2019-09-30 18:45:17 +0200
commit85bf1c438b36d91a77e3371d8fe2d8c3750c4858 (patch)
tree1b19515d1ed97f9c9a95256b9c4c3ec9cd950e4b /src/qmlworkerscript
parent45a6b25cc3bc62668097945d2569070e0be9a0e6 (diff)
WorkerScript: Directly delete QQuickWorkerScriptEnginePrivate
QQuickWorkerScriptEnginePrivate lives in the worker thread. Therefore, once the thread has finished there is no way to send it a deferred delete event. The object and all its children would always leak. As there is no event loop running in the worker thread anymore and this is the dtor of QQuickWorkerScript, it's safe to assume that no one can access the private object anymore afterwards. Change-Id: I51f583ea47060d967403639196247882ff7d2905 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qmlworkerscript')
-rw-r--r--src/qmlworkerscript/qquickworkerscript.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qmlworkerscript/qquickworkerscript.cpp b/src/qmlworkerscript/qquickworkerscript.cpp
index b93e297b61..8b236697b9 100644
--- a/src/qmlworkerscript/qquickworkerscript.cpp
+++ b/src/qmlworkerscript/qquickworkerscript.cpp
@@ -374,7 +374,7 @@ QQuickWorkerScriptEngine::~QQuickWorkerScriptEngine()
yieldCurrentThread();
}
- d->deleteLater();
+ delete d;
}
WorkerScript::WorkerScript(int id, QQuickWorkerScriptEnginePrivate *parent)