diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-06-13 14:30:03 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2014-07-22 13:49:19 +0200 |
commit | b393c405b7568e80628bc99501a9c53bbd0e678d (patch) | |
tree | 51280658b1ec97947a66c6afc503b23ae48f0d8d /src/particles | |
parent | 00a46fa07bf87c6ffa0d60b4a98b51685fdc1ef5 (diff) |
Change the object allocation scheme
Instead of allocating the data directly, centralize the object and its ::Data
allocation in one place in the memory manager. This is in preparation for
additional pointer indirection later.
Change-Id: I7880e1e7354b3258b6a8965be378cd09c9467d25
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/particles')
-rw-r--r-- | src/particles/qquickv4particledata.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/particles/qquickv4particledata.cpp b/src/particles/qquickv4particledata.cpp index cfe99afafc..4046c9da2e 100644 --- a/src/particles/qquickv4particledata.cpp +++ b/src/particles/qquickv4particledata.cpp @@ -520,7 +520,7 @@ QQuickV4ParticleData::QQuickV4ParticleData(QV8Engine* engine, QQuickParticleData QV8ParticleDataDeletable *d = particleV8Data(engine); QV4::ExecutionEngine *v4 = QV8Engine::getV4(engine); QV4::Scope scope(v4); - QV4::ScopedObject o(scope, new (v4) QV4ParticleData::Data(v4, datum)); + QV4::ScopedObject o(scope, v4->memoryManager->alloc<QV4ParticleData>(v4, datum)); QV4::ScopedObject p(scope, d->proto.value()); o->setPrototype(p.getPointer()); m_v4Value = o; |