mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-09 10:29:45 +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()
|
||||
{
|
||||
for (size_t i = 0; i < soundTracks.size(); ++i) {
|
||||
Mix_FreeChunk(soundTracks[i].sound);
|
||||
}
|
||||
soundTracks.clear();
|
||||
for (size_t i = 0; i < musicTracks.size(); ++i) {
|
||||
Mix_FreeMusic(musicTracks[i].m_music);
|
||||
}
|
||||
musicTracks.clear();
|
||||
|
||||
musicReadBlob.clear();
|
||||
|
|
Loading…
Reference in a new issue