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

serverConnectionNames QStringList from QDBusConnectionPrivate will be cleared in destructor of QDBusServer only

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.2.0, 6.6.0
    • D-Bus
    • None

    Description

      serverConnectionNames QStringList from QDBusConnectionPrivate server connection in QDBusServer will be cleared in destructor of QDBusServer only.
      This is the only place where it is cleared:

      QDBusServer::~QDBusServer()
      {
          if (QDBusConnectionManager::instance()) {
              QMutexLocker locker(&QDBusConnectionManager::instance()->mutex);
              Q_FOREACH (const QString &name, d->serverConnectionNames) {
                  QDBusConnectionManager::instance()->removeConnection(name);
              }
              d->serverConnectionNames.clear();   // Here it is
          }
      }
      

      So in server application where QDBusServer is created on startup and removed on shutdown this QStringList will eat memory.

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            shkilius Oleksandr Shkil
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes