Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.4
-
None
-
I have seen this on snow leopard and windows 7, I have not tested any other operating systems.
-
7ab0bed3a56d46c386e65abc381264c57137cb43
Description
I am using about 2000 test images with resolution 1024x768(they are the sample pictures that come with windows, I mention this in case there's some dependency on the image size). I load the pixmaps into QPixmapCache using the following code(this is from a minimum compilable example so I'm not storing the key for retrieval):
QPixmap pixmap(filename);
QPixmapCache::insert(pixmap);
When I set cache limit to a small value such as 2048, the memory usage of my application's process is fairly steady and under 20 mb. When I set the cache limit to something higher such as 10240(the default), my application's memory usage shoots to over a gigabyte as all the images are loaded in. Based on the documentation, I do not think that it's supposed to work this way.
I have attached a minimum(more or less) compilable example of this behavior. To see the behavior click the import button, import a large number of copies of images around 1024x768 in size, and watch the memory usage soar in the task manager.
Attachments
Issue Links
- relates to
-
QTBUG-81266 figure out whether QPixmapCache and QQuickPixmapCache can be unified
- Reported