summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/script/api/qscriptengine.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index f4e9594..c14e38a 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -836,11 +836,6 @@ QScriptEnginePrivate::QScriptEnginePrivate()
QScriptEnginePrivate::~QScriptEnginePrivate()
{
- while (freeScriptValues) {
- QScriptValuePrivate *p = freeScriptValues;
- freeScriptValues = p->next;
- qFree(p);
- }
while (!ownedAgents.isEmpty())
delete ownedAgents.takeFirst();
detachAllRegisteredScriptValues();
@@ -849,6 +844,11 @@ QScriptEnginePrivate::~QScriptEnginePrivate()
JSC::JSLock lock(false);
globalData->heap.destroy();
globalData->deref();
+ while (freeScriptValues) {
+ QScriptValuePrivate *p = freeScriptValues;
+ freeScriptValues = p->next;
+ qFree(p);
+ }
}
QScriptValue QScriptEnginePrivate::scriptValueFromVariant(const QVariant &v)