Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 9f658003 authored by Michael Pyne's avatar Michael Pyne

Fix JuK memory/resource leak with AudioObjects and ensure that the media...

Fix JuK memory/resource leak with AudioObjects and ensure that the media objects for formerly playing tracks are punctually deleted.

svn path=/trunk/KDE/kdemultimedia/juk/; revision=831168
parent 61959d79
......@@ -617,6 +617,7 @@ void PlayerManager::crossfadeToFile(const FileHandle &newFile)
Phonon::AudioOutput *out = m_output;
mo->disconnect(this);
out->setParent(mo); // Allow mo's death to also kill out
connect(mo, SIGNAL(finished()), SLOT(slotKillSender()));
m_media = new Phonon::MediaObject(this);
......@@ -651,6 +652,9 @@ void PlayerManager::crossfadeToFile(const FileHandle &newFile)
m_fader->setVolume(0.0f);
m_fader->fadeTo(m_output->volume(), 2000);
// Give the media object some extra time for good measure but then kill it.
QTimer::singleShot(4000, mo, SLOT(deleteLater()));
}
QString PlayerManager::randomPlayMode() const
......
Markdown is supported
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