--- a/project_files/HedgewarsMobile/Classes/VoicesViewController.m Mon Oct 11 16:56:00 2010 -0400
+++ b/project_files/HedgewarsMobile/Classes/VoicesViewController.m Tue Oct 12 05:06:30 2010 +0200
@@ -147,12 +147,17 @@
Mix_FreeChunk(voiceBeingPlayed);
voiceBeingPlayed = NULL;
}
+ self.lastIndexPath = nil;
MSG_MEMCLEAN();
[super didReceiveMemoryWarning];
}
-(void) viewDidUnload {
- voiceBeingPlayed = NULL;
+ if (voiceBeingPlayed != NULL) {
+ Mix_HaltChannel(lastChannel);
+ Mix_FreeChunk(voiceBeingPlayed);
+ voiceBeingPlayed = NULL;
+ }
self.lastIndexPath = nil;
self.teamDictionary = nil;
self.voiceArray = nil;