Hi all,

I've designed a program, which shall run 24/7 for several days in order to read some input sensors and update the drawings on my screen. The program two modes, 'config' and 'active'. In the first mode (no inputs read, no graphical update needed), it can run for some weeks without issue. In the 'active' mode it crashes after appr. two days. In the 'active' mode, the program reads the inputs and calls the paintevents.

I've stripped the code down and attached it as a seperate file. Attachment 12180

Some explanation to the program structure:
- I wrote an imagecontroller, which loads all required pictures in a QMap of QPixmaps. From there on, all pictures are referenced by a unique id. (QImageController.*pp). This image controller exits only once in the program.
- The 'viewData' class represents a child of abstract class 'genericViewPage' which is a specialized QWidget to draw on. ViewData provides a background picture, which is used in fullscreen, and a QList of 'elementRect' as dynamic content elements.
- 'elementRects' class has a list of 'elementStates' and chooses the current elementState based on the state of the sensor input.
- 'elementState' class is a representation based on a picture and/or text.

This is how the program should work: (and mainly does)
- When starting the program, the imagecontroller loads all required QPixmaps in a QMap. (function addFile(...) )
- The program changes into the 'active' mode.
- From now on the program reads the sensor inputs and calls the 'repaintRequest(...)' of the viewData.
- In 'paintevent()', viewData paints the background and calls the paintevent of the parent (genericviewpage)
- genericPageview repaints all elements in the list (function drawMe(...)).
- Each element asks the current elementState to get a pixmap to draw (function getImage(...)).
- The elementState gets a QPixmap from the Imagecontroller (function getPixmap(...)) and copies it into the required sized qpixmap. If necessary it writes text into it and returns.

This paint process seems to use more and more graphical memory without releasing any/or all. So I end up with not loading images after some hours and eventually a crashing program.
I've tried several ways to get the issue fixed but didn't get it. So I would appreciate, if someone can have a second look and let me know, what am I doing wrong here???

Thanks a lot. Oh, and please let me know, which information you would need to help with the issue.

Dirk