Only every once in a while the iPhone app is crashing when I perform fSound->release() below. I think that the fSound casting may be null or invalid. In Objective-C you can use something like isKindOfClass to make sure the object is of the proper type (only works for Objective-C classes). How can I check to make sure that fSound is a valid FMOD::Sound class type before releasing it?

-(void) unloadSound:(FMOD::Sound *)fSound {
if (fSound == nil) {

FMOD_RESULT   result        = FMOD_OK;
result = fSound->release();
fSound = NULL;


  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.