diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-01-03 12:26:19 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2013-01-03 14:24:52 +0100 |
commit | 03573f480a086ede7c8150a800790be22fa43d4d (patch) | |
tree | bfbcb15f39c17865f2cd3402f74c4ce1baebc529 /main.cpp | |
parent | 215c0458e6b6f19677b6ba0b3a88ecc3b2e4b58b (diff) |
Clean up memory manager ownership
Since we have now only one memory manager, we might as well let the
ExecutionEngine create and own it.
Change-Id: I908adadf64da59e0b8f4c09d4d9502785399cb99
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -333,7 +333,6 @@ int main(int argc, char *argv[]) #endif // QMLJS_NO_LLVM case use_masm: case use_moth: { - QScopedPointer<QQmlJS::VM::MemoryManager> mm(new QQmlJS::VM::MemoryManager); QScopedPointer<QQmlJS::EvalISelFactory> iSelFactory; if (mode == use_moth) { iSelFactory.reset(new QQmlJS::Moth::ISelFactory); @@ -341,7 +340,7 @@ int main(int argc, char *argv[]) iSelFactory.reset(new QQmlJS::MASM::ISelFactory); } - QQmlJS::VM::ExecutionEngine vm(mm.data(), iSelFactory.data()); + QQmlJS::VM::ExecutionEngine vm(iSelFactory.data()); QScopedPointer<QQmlJS::Debugging::Debugger> debugger; if (enableDebugging) @@ -396,7 +395,7 @@ int main(int argc, char *argv[]) } } - mm->dumpStats(); + vm.memoryManager->dumpStats(); } return EXIT_SUCCESS; } } |