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

Memory leak when using QSystemTrayIcon on Linux

XMLWordPrintable

    • Linux/X11, macOS

      When executing the SystemTrayIcon example application (https://code.qt.io/cgit/qt/qtbase.git/tree/examples/widgets/desktop/systray?h=6.4.2) through valgrind, I can see a leaked memory originating in QDBusPlatformMenu::createMenuItem().
      Looking at that code (https://github.com/qt/qtbase/blob/6.4.2/src/gui/platform/unix/dbusmenu/qdbusplatformmenu.cpp#L263) I can see a new, however the whole file has no deletes.
      Is it possible to fix this? Should the example, and we, do something differently to release this memory? The valgrind error makes it look like the problem originated in our code, which is not ideal.

      Thanks!

       

      Attached example can be used to see the issue on Mac with Activity monitor. Just open Activity monitor and run the example. Then keep hitting push button to change the icon. You can observe the change in memory

        1. qtbug119360.zip
          11 kB
          Irfan Omair
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            axelspoerl Axel Spoerl
            hagen.moebius Hagen Möbius
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes