diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2012-12-04 11:30:26 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-12-04 16:58:26 +0100 |
commit | 070e0d07d821342bfbe7a409a51c4c53185c62c7 (patch) | |
tree | c9c8679b243095f1b038cab38f26853e60954e99 /qmljs_engine.cpp | |
parent | a2b6483dbebd0faa768e049d69d9aa621b8e0fad (diff) |
Fix another memory leak.
Now we should only leak objects that are VM::Values, and directly
related objects like the PropertyTable. The directly related ones will
disappear through destructor calls when the VM::Values are GC-ed.
Change-Id: Id221ac62a22671d86bbc6ac9beea49d2bd5b330d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'qmljs_engine.cpp')
-rw-r--r-- | qmljs_engine.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/qmljs_engine.cpp b/qmljs_engine.cpp index 6c5edd16e2..4af900549d 100644 --- a/qmljs_engine.cpp +++ b/qmljs_engine.cpp @@ -187,6 +187,13 @@ ExecutionEngine::ExecutionEngine(EvalISelFactory *factory) glo->__put__(rootContext, identifier(QStringLiteral("isFinite")), Value::fromObject(new IsFiniteFunction(rootContext))); // isFinite [15.1.2.5] } +ExecutionEngine::~ExecutionEngine() +{ + delete globalObject.asObject(); + delete rootContext; + delete stringPool; // the String pointers should get GC-ed. +} + ExecutionContext *ExecutionEngine::newContext() { return new ExecutionContext(); |