I’m having a nasty memory leak everytime I play a 3D sound. If I have the following code commented out, the leak goes away. Otherwise, I lose a few K every second. Eventually, it starts to be quite significant. Also, I did call “FMOD::Memory_Initialize(ptr, len, NULL, NULL, NULL);” with a 5 Meg chunk of RAM before I created the FMOD sound system pointer, but this didn’t seem to help at all.
44100, // hertz
fmod_position.x = soundPosition.x;
fmod_position.y = soundPosition.y;
fmod_position.z = soundPosition.z;
The _soundRecords is a fixed array of 20 records that I use to make sure I don’t play more than 20 sounds at once. As a sound completes, I make the entry available for the next sound. Also, I’m not running out of sound slots.
Is there some kind of known memory leak with FMOD Ex?
- RWThurman asked 11 years ago
I think I found out where my memory leak was. It’s my fault of course, but I misunderstood the documentation.
I don’t have to free any channels. In fact, you can only stop them anyways?
I DO have to free my sound objects. I wasn’t doing this previously.
That’s it? Right? I won’t have any more memory leaks?
Please login first to submit.