summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;