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