Answer the question
In order to leave comments, you need to log in
Qt Chip Example reduce memory consumption?
There is an example in Qt for QGraphicsScene , it's called Chip. If you run it and in one window begin to intensively zoom in + and in - and drag (do not rotate!), then the memory consumption of the chip process will grow (you can check it like this top | grep chip ). Moreover, it grows more and more over time (although sometimes it seems that it has stopped, just try it differently and it will flow). Tk here is the question, how to make the application memory size const and not grow due to zoom and drag.
Answer the question
In order to leave comments, you need to log in
I don’t remember what in that specific example, but I assume that this is not a memory leak, it’s just that the loaded elements are no longer unloaded. To make it const, you need to load everything at once, it will be a gigantic volume, probably tens of gigabytes.
40,000 chip objects is really not much. That's not the problem. The problem is that the consumed memory is growing. And it does not stop in its growth, although there are no prerequisites for this. all 40k objects are in memory and created 1 time. By the way, if you increase the number to 80-100k, then the memory leak rate will increase.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question