mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-24 17:54:59 +01:00
Don't leak sounds/music
This commit is contained in:
parent
f3b26904ec
commit
abbf6bafb9
1 changed files with 6 additions and 0 deletions
|
@ -6,7 +6,13 @@
|
||||||
|
|
||||||
void musicclass::init()
|
void musicclass::init()
|
||||||
{
|
{
|
||||||
|
for (size_t i = 0; i < soundTracks.size(); ++i) {
|
||||||
|
Mix_FreeChunk(soundTracks[i].sound);
|
||||||
|
}
|
||||||
soundTracks.clear();
|
soundTracks.clear();
|
||||||
|
for (size_t i = 0; i < musicTracks.size(); ++i) {
|
||||||
|
Mix_FreeMusic(musicTracks[i].m_music);
|
||||||
|
}
|
||||||
musicTracks.clear();
|
musicTracks.clear();
|
||||||
|
|
||||||
musicReadBlob.clear();
|
musicReadBlob.clear();
|
||||||
|
|
Loading…
Add table
Reference in a new issue