From 28bb56634b786564ec4623b7f143255f5b87686f Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 22 Jan 2018 14:16:33 +0100 Subject: Remove some scopes in the memory manager These allocation functions only perform a single allocation. Since all live objects have to be reachable by the GC before calling into it, these scopes are not required. Change-Id: Ia7e89791d6ff2bfe87b7c5462191d28e04688df1 Reviewed-by: Simon Hausmann --- src/qml/memory/qv4mm_p.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/qml') diff --git a/src/qml/memory/qv4mm_p.h b/src/qml/memory/qv4mm_p.h index bc9b7130c7..d61655c38a 100644 --- a/src/qml/memory/qv4mm_p.h +++ b/src/qml/memory/qv4mm_p.h @@ -224,19 +224,17 @@ public: template typename ObjectType::Data *allocObject(Heap::InternalClass *ic, Args... args) { - Scope scope(engine); - Scoped t(scope, allocateObject(ic)); - t->d_unchecked()->init(args...); - return t->d(); + typename ObjectType::Data *d = allocateObject(ic); + d->init(args...); + return d; } template typename ObjectType::Data *allocObject(InternalClass *ic, Args... args) { - Scope scope(engine); - Scoped t(scope, allocateObject(ic)); - t->d_unchecked()->init(args...); - return t->d(); + typename ObjectType::Data *d = allocateObject(ic); + d->init(args...); + return d; } template -- cgit v1.2.3