Make sure to call the VariantObject destructor from its destroy method,
in order to ensure that the ExecutionEngine::ScarceResourceData destructor
we inherit from is also called, which ensures that the refcount in the
QVariant it holds also drops correctly.
Fixes tst_qqmlecmascript::propertyVarCircular
Change-Id: I14df8e2f0d5be6f3049a295a527afa09e19f0ef2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
VariantObject *v = static_cast<VariantObject *>(that);
if (v->isScarce())
v->node.remove();
- Object::destroy(that);
+ v->~VariantObject();
}
bool VariantObject::isEqualTo(Managed *m, Managed *other)