Yevgeny
28-08-2014 14:58:23
Hello!
I'm using OgreOggSound 1.21. I want to have an unique musical theme in every level in my game, so I'm loading it with createSound. But what is the right way to unload it after the level end and to free memory it occupies?
I've tried to call destroySound, destroyAllSounds, tried to destroy corresponding SceneManager and to unload resource group -- pointers to sound objects are invalidated, but there are still 10 MB lack in the heap (for the ogg file of 3.5 MB). Lack size depends on the size of sound file and without sound there's no lack.
So, what is the right way to handle it?
I'm using OgreOggSound 1.21. I want to have an unique musical theme in every level in my game, so I'm loading it with createSound. But what is the right way to unload it after the level end and to free memory it occupies?
I've tried to call destroySound, destroyAllSounds, tried to destroy corresponding SceneManager and to unload resource group -- pointers to sound objects are invalidated, but there are still 10 MB lack in the heap (for the ogg file of 3.5 MB). Lack size depends on the size of sound file and without sound there's no lack.
So, what is the right way to handle it?