QDBusConnectionManager::~QDBusConnectionManager() { for (QHash<QString, QDBusConnectionPrivate *>::const_iterator it = connectionHash.constBegin(); it != connectionHash.constEnd(); ++it) { QDBusConnectionPrivate *d = it.value(); if (!d->ref.deref()) d->deleteYourself(); else d->closeConnection(); } connectionHash.clear(); }
void QDBusConnectionManager::removeConnection(const QString &name) { QDBusConnectionPrivate *d = 0; d = connectionHash.take(name); if (d && !d->ref.deref()) d->deleteYourself(); // Static objects may be keeping the connection open. // However, it is harmless to have outstanding references to a connection that is // closing as long as those references will be soon dropped without being used. // ### Output a warning if connections are being used after they have been removed. }