diff -Nru qt4-x11-4.7.2/debian/changelog qt4-x11-4.7.2/debian/changelog --- qt4-x11-4.7.2/debian/changelog 2011-03-25 17:33:53.000000000 +0000 +++ qt4-x11-4.7.2/debian/changelog 2011-04-26 17:09:17.000000000 +0100 @@ -1,3 +1,10 @@ +qt4-x11 (4:4.7.2-0ubuntu6.1) natty-proposed; urgency=low + + * Add kubuntu_92_qml_memory_leak.diff from Canonical Design team to + fix a memory leak in QML, LP: #723956 + + -- Jonathan Riddell Tue, 26 Apr 2011 17:07:09 +0100 + qt4-x11 (4:4.7.2-0ubuntu6) natty; urgency=low * SECURITY UPDATE: Fake SSL certificates produced by Comodo, LP: #742377 diff -Nru qt4-x11-4.7.2/debian/patches/kubuntu_92_qml_memory_leak.diff qt4-x11-4.7.2/debian/patches/kubuntu_92_qml_memory_leak.diff --- qt4-x11-4.7.2/debian/patches/kubuntu_92_qml_memory_leak.diff 1970-01-01 01:00:00.000000000 +0100 +++ qt4-x11-4.7.2/debian/patches/kubuntu_92_qml_memory_leak.diff 2011-04-26 17:06:24.000000000 +0100 @@ -0,0 +1,49 @@ +From adb6a8043cac315730c231da5e70cb80570a9b7b Mon Sep 17 00:00:00 2001 +From: Florian Boucault +Date: Tue, 26 Apr 2011 17:50:54 +0200 +Subject: [PATCH] Immediatly delete obj in release() rather than using deleteLater() + +Fixes a memory leak in unity-2d-places, see: +https://bugs.launchpad.net/unity-2d/+bug/723956 + +Test-case to reproduce: +--- +import Qt 4.7 + +Item { + Repeater { + id: repeater + delegate: Item{ + } + } + focus: true + Keys.onPressed: { + if (event.key == Qt.Key_Return) { + var i + for (i=0; i<300; i++) { + repeater.model = 100 + repeater.model = 0 + } + } + } +} +--- +--- + .../graphicsitems/qdeclarativevisualitemmodel.cpp | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +index 065a388..a7884c0 100644 +--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp ++++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +@@ -994,7 +994,7 @@ QDeclarativeVisualDataModel::ReleaseFlags QDeclarativeVisualDataModel::release(Q + item->scene()->removeItem(item); + } + stat |= Destroyed; +- obj->deleteLater(); ++ delete obj; + } else if (!inPackage) { + stat |= Referenced; + } +-- +1.7.4.1 diff -Nru qt4-x11-4.7.2/debian/patches/series qt4-x11-4.7.2/debian/patches/series --- qt4-x11-4.7.2/debian/patches/series 2011-03-25 10:34:39.000000000 +0000 +++ qt4-x11-4.7.2/debian/patches/series 2011-04-26 17:06:32.000000000 +0100 @@ -48,3 +48,4 @@ kubuntu_23_arm_memory_barriers.patch kubuntu_02_neon_flags.patch kubuntu_30_blacklist_ssl_certificates.diff +kubuntu_92_qml_memory_leak.diff