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

Memory leak when using QSystemTrayIcon on Linux

    XMLWordPrintable

Details

    • Linux/X11, macOS

    Description

      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

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes