Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-27472

QFontEngine object reference leak on QPainter::drawText

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • 4.8.x
    • 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

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              nikolaynnov Andrey
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes