Skip to contentSkip to conversation

qtdeclarative: fix memory leaks

PATCH New Gordan Markuš 1 participant 1 message Apr 11, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qtdeclarative: fix memory leaks

* Fix QQmlExpression leaking QQmlError objects
* Fix V4 Javascript Engine creating duplicate entries
* Fix memory leak in QQuickWindowPrivate::deliverTouchAsMouse

---
 ...-QQmlExpression-leaking-QQmlError-objects.patch | 35 +++++++++
 .../qtdeclarative/0002-Fix-memory-leak-in-V4.patch | 44 ++++++++++++
 ...leak-in-QQuickWindowPrivate-deliverTouchA.patch | 84 ++++++++++++++++++++++
 recipes-qt/qt5/qtdeclarative_git.bb                |  6 ++
 4 files changed, 169 insertions(+)
 create mode 100644 recipes-qt/qt5/qtdeclarative/0001-Fix-QQmlExpression-leaking-QQmlError-objects.patch
 create mode 100644 recipes-qt/qt5/qtdeclarative/0002-Fix-memory-leak-in-V4.patch
 create mode 100644 recipes-qt/qt5/qtdeclarative/0003-fix-memory-leak-in-QQuickWindowPrivate-deliverTouchA.patch
recipes-qt/qt5/qtdeclarative/0001-Fix-QQmlExpression-leaking-QQmlError-objects.patch new file +35 -0
new file mode 100644
index 0000000..050a914
@@ -0,0 +1,35 @@
+From f9dcbf008b430aadd464985b7a618eca8173d264 Mon Sep 17 00:00:00 2001
+From: Robert Griebl <[email protected]>
+Date: Thu, 23 Feb 2017 15:11:13 +0100
+Subject: [PATCH 1/3] Fix QQmlExpression leaking QQmlError objects
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+If the user doesn't clear any potential errors manually via clearError(),
+then do it automatically in the destructor. Found with valgrind.
+
+[ChangeLog][QtQml][QQmlExpression] Fixed memory leak
+
+Change-Id: If5b1181850c7463c939a7ba536d74e7054c53d60
+Reviewed-by: Simon Hausmann <[email protected]>
+Signed-off-by: Gordan Markuš <[email protected]>
+---
+ src/qml/qml/qqmlexpression.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/qml/qml/qqmlexpression.cpp b/src/qml/qml/qqmlexpression.cpp
+index 6afbd05..5cb3d4d 100644
+--- a/src/qml/qml/qqmlexpression.cpp
++++ b/src/qml/qml/qqmlexpression.cpp
+@@ -200,6 +200,7 @@ QQmlExpression::QQmlExpression(QQmlContextData *ctxt, QObject *scope,
+ */
+ QQmlExpression::~QQmlExpression()
+ {
++    clearError();
+ }
+ 
+ /*!
+-- 
+2.9.3
+
recipes-qt/qt5/qtdeclarative/0002-Fix-memory-leak-in-V4.patch new file +44 -0

44 lines not on this page · raw message

recipes-qt/qt5/qtdeclarative/0003-fix-memory-leak-in-QQuickWindowPrivate-deliverTouchA.patch new file +84 -0

84 lines not on this page · raw message

recipes-qt/qt5/qtdeclarative_git.bb +6 -0
index a620a00..c19bbd5 100644
@@ -14,6 +14,12 @@ LIC_FILES_CHKSUM = " \
     file://LICENSE.FDL;md5=6d9f2a9af4c8b8c3c769f6cc1b6aaf7e \
 "
 
+SRC_URI += " \
+    file://0001-Fix-QQmlExpression-leaking-QQmlError-objects.patch \
+    file://0002-Fix-memory-leak-in-V4.patch \
+    file://0003-fix-memory-leak-in-QQuickWindowPrivate-deliverTouchA.patch \
+"
+
 DEPENDS += "qtbase"
 
 PACKAGECONFIG ??= "qtxmlpatterns"
Signature · 1 line
2.9.3