From 0484ce38416fd3906cc1165995ecb0db8dd6c308 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 1 Sep 2009 15:34:32 +1000 Subject: Don't leak objects. --- src/declarative/qml/qmlengine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/qml/qmlengine.cpp b/src/declarative/qml/qmlengine.cpp index d06376a..4b98d1b 100644 --- a/src/declarative/qml/qmlengine.cpp +++ b/src/declarative/qml/qmlengine.cpp @@ -568,7 +568,7 @@ QScriptValue QmlEnginePrivate::qmlScriptObject(QObject* object, QmlEngine* engine) { QScriptEngine *scriptEngine = QmlEnginePrivate::getScriptEngine(engine); - return scriptEngine->newObject(new QmlObjectScriptClass(engine), scriptEngine->newQObject(object)); + return scriptEngine->newObject(engine->d_func()->objectClass, scriptEngine->newQObject(object, QScriptEngine::AutoOwnership)); } /*! -- cgit v0.12