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>
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();
struct StringPool *stringPool;
ExecutionEngine(EvalISelFactory *iselFactory);
+ ~ExecutionEngine();
ExecutionContext *newContext();