Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
4.7.4, 4.8.3
-
None
-
Win7 Pro x32, Qt 4.7.4, MSVS2005
Description
I have the app which uses both MFC and Qt frameworks. I use QtWinMigrate library from qt-solutions. For some reasons I cann't have qApp instance during whole application lifetime. So in my app QApplication is dynamically created/destroyed when needed. I have found what drawText causes memory leaks in my app. I have made some investigation and found a cause for the biggest of them. Test example and patch attached. Note: Memory leaks still here. Patch fixes only one of all causes. In my tests (see example, 1000 cycles)
1) when call of drawText is commented - app uses 8.9 MB of memory
2) with call of drawText - after 1000 cycles the app uses 282 MB of memory
3) with patch - after 1000 cycles the app uses 9.8MB of memory
4) with patch 44c14470e5b28e45c19d6959b114e063cf3f4d83 - after 1000 cycles the app uses 282 MB of memory
Attachments
Issue Links
- is replaced by
-
QTBUG-21222 memory leak in QPainter::drawText()
- Closed