ContextAlbum: Delete timeline to delete previous cover

QTimeLine was holding the previous covers shared pointer in the signal/slot connection, which caused it to never be free'd even though it's removed from the previous_covers_ list.
To fix this, make sure the QTimeLine is deleted.

This fixes a huge memory leak.

Addresses issue #1464
This commit is contained in:
Jonas Kvinge 2024-06-20 16:05:07 +02:00
parent 6177d4a2c4
commit 70c2b99771
1 changed files with 1 additions and 0 deletions

View File

@ -235,6 +235,7 @@ void ContextAlbum::FadePreviousCover(SharedPtr<PreviousCover> previous_cover) {
void ContextAlbum::FadePreviousCoverFinished(SharedPtr<PreviousCover> previous_cover) { void ContextAlbum::FadePreviousCoverFinished(SharedPtr<PreviousCover> previous_cover) {
previous_cover->timeline.reset();
previous_covers_.removeAll(previous_cover); previous_covers_.removeAll(previous_cover);
} }