summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-11-24 06:36:06 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-11-24 06:36:06 (GMT)
commit3509b9b5036a3c7d7512c7f0f3f98b2af4227fc2 (patch)
tree0880c81918a0f3b5be9afde687144598a6fb6262
parent3d2b0d622908fe2c89ac1c2d5a5cb7ed96a24b6a (diff)
downloadQt-3509b9b5036a3c7d7512c7f0f3f98b2af4227fc2.zip
Qt-3509b9b5036a3c7d7512c7f0f3f98b2af4227fc2.tar.gz
Qt-3509b9b5036a3c7d7512c7f0f3f98b2af4227fc2.tar.bz2
Fix memory leak
QTBUG-6156
-rw-r--r--src/declarative/graphicsitems/qmlgraphicspainteditem.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicspainteditem.cpp b/src/declarative/graphicsitems/qmlgraphicspainteditem.cpp
index 2f467e7..948f69a 100644
--- a/src/declarative/graphicsitems/qmlgraphicspainteditem.cpp
+++ b/src/declarative/graphicsitems/qmlgraphicspainteditem.cpp
@@ -289,7 +289,7 @@ void QmlGraphicsPaintedItem::paint(QPainter *p, const QStyleOptionGraphicsItem *
}
cachesize -= d->imagecache[oldest]->area.width()*d->imagecache[oldest]->area.height();
uncached += d->imagecache[oldest]->area;
- d->imagecache.removeAt(oldest);
+ delete d->imagecache.takeAt(oldest);
}
const QRegion bigger = QRegion(biggerrect) & uncached;
const QVector<QRect> rects = bigger.rects();
@@ -366,7 +366,7 @@ void QmlGraphicsPaintedItem::setPixelCacheSize(int pixels)
}
}
cachesize -= d->imagecache[oldest]->area.width()*d->imagecache[oldest]->area.height();
- d->imagecache.removeAt(oldest);
+ delete d->imagecache.takeAt(oldest);
}
}
d->max_imagecache_size = pixels;