Threading bug?

stickymango

13-03-2008 12:48:53

Hi Casey,

I may have discovered a bug with the threaded version of OgreAL and destroying sounds. I'm getting memory leaks when trying to use destroySound() and I've noticed between threaded/non-threaded versions, a different update function is used in SoundManager, i.e. frameStarted (Non-threaded) and threadUpdate() (Threaded).

It looks like the code which checks the mSoundsToDestroy list is skipped in the threaded version, it just calls updateSounds()?

It cleans up fine if I don't call destroySound() and just let SoundManager clean up on shutdown, but if I try to manually destroySound() it leaves leaks.

Should I be doing something else when deleting manually and using threads?

CaseyB

13-03-2008 15:06:32

Should I be doing something else when deleting manually and using threads?
Nope, that's my mistake, I'll fix it and commit it tonight! Thanks for catching that!