K
K
Konstantin42016-04-05 19:21:00
Qt
Konstantin4, 2016-04-05 19:21:00

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

3 answer(s)
J
Jacob E, 2016-04-05
@Zifix

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.

K
Konstantin4, 2016-04-05
@Konstantin4

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.

A
Alexander, 2015-02-28
Madzhugin @Suntechnic

Show the whole challenge.
Why did you decide it didn't work?
What's with the PHP tag?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question