mirror of
https://github.com/clangen/musikcube.git
synced 2025-01-06 06:54:29 +00:00
Clear caches between shuffling to keep memory usage as light as possible.
This commit is contained in:
parent
c32a71af93
commit
d989d00768
@ -141,6 +141,9 @@ void PlaybackService::ToggleShuffle() {
|
|||||||
id = this->playlist.GetId(this->index);
|
id = this->playlist.GetId(this->index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this->playlist.ClearCache();
|
||||||
|
this->unshuffled.ClearCache();
|
||||||
|
|
||||||
if (this->unshuffled.Count() > 0) { /* shuffled -> unshuffled */
|
if (this->unshuffled.Count() > 0) { /* shuffled -> unshuffled */
|
||||||
this->playlist.Clear();
|
this->playlist.Clear();
|
||||||
this->playlist.Swap(this->unshuffled);
|
this->playlist.Swap(this->unshuffled);
|
||||||
|
Loading…
Reference in New Issue
Block a user