From 48b2d386399341307027efb151f59873c5372407 Mon Sep 17 00:00:00 2001 From: Vadim Zakondyrin Date: Sat, 17 Nov 2012 19:29:25 +0700 Subject: [PATCH] Fixed memory leak of registered QML modules Change-Id: I254f755641f5ac8383e5818b5294ec85fd9236e8 Reviewed-by: Lars Knoll Reviewed-by: Christopher Adams --- src/qml/qml/qqmlmetatype.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/qml/qml/qqmlmetatype.cpp b/src/qml/qml/qqmlmetatype.cpp index 1fdc1b9..595f9e8 100644 --- a/src/qml/qml/qqmlmetatype.cpp +++ b/src/qml/qml/qqmlmetatype.cpp @@ -139,6 +139,10 @@ QQmlMetaTypeData::~QQmlMetaTypeData() { for (int i = 0; i < types.count(); ++i) delete types.at(i); + + TypeModules::const_iterator i = uriToModule.constBegin(); + for (; i != uriToModule.constEnd(); ++i) + delete *i; } class QQmlTypePrivate -- 2.7.4