diff options
Diffstat (limited to 'src/qml/memory')
-rw-r--r-- | src/qml/memory/qv4mm_p.h | 14 |
1 files changed, 6 insertions, 8 deletions
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, typename... Args> typename ObjectType::Data *allocObject(Heap::InternalClass *ic, Args... args) { - Scope scope(engine); - Scoped<ObjectType> t(scope, allocateObject<ObjectType>(ic)); - t->d_unchecked()->init(args...); - return t->d(); + typename ObjectType::Data *d = allocateObject<ObjectType>(ic); + d->init(args...); + return d; } template <typename ObjectType, typename... Args> typename ObjectType::Data *allocObject(InternalClass *ic, Args... args) { - Scope scope(engine); - Scoped<ObjectType> t(scope, allocateObject<ObjectType>(ic)); - t->d_unchecked()->init(args...); - return t->d(); + typename ObjectType::Data *d = allocateObject<ObjectType>(ic); + d->init(args...); + return d; } template <typename ObjectType, typename... Args> |