Fix memory leak
authorAlan Alpert <aalpert@rim.com>
Fri, 25 Jan 2013 01:42:20 +0000 (17:42 -0800)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 29 Jan 2013 01:30:06 +0000 (02:30 +0100)
The cache is filled with dynamically created entries, so clear is not
quite enough.

Change-Id: I40a49ce5d1a3d6da1b419e85cae95f2f95011a19
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>

src/qml/qml/qqmlimport.cpp

index f257389..fb4d8c0 100644 (file)
@@ -1344,6 +1344,7 @@ QQmlImportDatabase::QQmlImportDatabase(QQmlEngine *e)
 
 QQmlImportDatabase::~QQmlImportDatabase()
 {
+    qDeleteAll(qmldirCache);
     qmldirCache.clear();
 }