QPixmap is implicitly shared, so assigning the same QPixmap (by value) in n places does not result in n copies of the pixmap data: they share the same bulk data. If you modify one of the copies then that instance is split from the others and the data is copied at that point in time. Depending on whether you have 40 * 5 distinct images or 40 sets of 5 identical (copied) images then you may not have the memory consumption you are expecting.




Reply With Quote

Bookmarks