Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.8.0
-
None
-
86ac78bdc0dce95489f3f8af1b4b062f426d399c
Description
Consider this simple example
import QtQuick 2.6 ListView { width: 320 height: 480 model: 1000 delegate: Canvas { id: canvas width: parent.width height: width onPaint: { var ctx = getContext("2d") ctx.strokeStyle = "red" ctx.lineWidth = 2 ctx.beginPath() for (var i = 1; i < 20; ++i) { ctx.lineTo(Math.random() * canvas.width, Math.random() * canvas.height); } ctx.stroke(); } } }
Scroll down and up and see how memory consumed by the process goes up. Neither QPixmapCache::clear() nor QJSEngine::collectGarbage() nor QQmlEngine::trimComponentCache() help