Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.6.1, 5.7.0
-
Windows
-
-
1d09b0d1b28eaea17069f7359956640f31ea79c6 (qtbase/5.12, 28.9.2018, 5.12b1)
Description
When QGraphicsItem (QGraphicsTextItem in this scenario) is part of a QGraphicsScene, but the scene is not attached to a view, modifying the Item's geometry, contents or anything that requires redraw, increases memory consumption.
This is caused by line:
d->updatedRects << rect; (QGraphicsScene.cpp@3198)
In this specific use-case, the scene may never be attached to a view, so the updatedRects QList is never cleared.
Steps to reproduce:
- Run attached sample
- Observe memory usage
- EXPECTED: Memory usage does not increase at such high rate (if at all)
- ACTUAL: Memory usage increases a lot indefinitely