Commit 1b32e22b authored by Christian Esken's avatar Christian Esken
Browse files

Fix a small memory leak

CCBUGS: 309464
parent d6ec59c0
......@@ -123,8 +123,8 @@ void ControlManager::addListener(QString mixerId, ControlChangeType::Type change
if ( changeType & ct )
{
// Add all listeners.
Listener* listener = new Listener(mixerId, ct, target, sourceId);
listeners.append(*listener);
Listener listener = Listener(mixerId, ct, target, sourceId);
listeners.append(listener);
listenersChanged = true;
}
}
......@@ -157,6 +157,7 @@ void ControlManager::removeListener(QObject* target, QString sourceId)
kDebug()
<< "Stop Listening of " << listener.getSourceId() << " requested by " << sourceId << " from " << target;
it.remove();
// Hint: As we have actual objects no explicit delete is needed
listenersChanged = true;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment