Fixed memory leak of registered QML modules
authorVadim Zakondyrin <thekondr@crystalnix.com>
Sat, 17 Nov 2012 12:29:25 +0000 (19:29 +0700)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 19 Nov 2012 21:37:32 +0000 (22:37 +0100)
Change-Id: I254f755641f5ac8383e5818b5294ec85fd9236e8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
src/qml/qml/qqmlmetatype.cpp

index 1fdc1b9..595f9e8 100644 (file)
@@ -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