cocoaTouch/VoicesViewController.m
changeset 3490 016b3172b645
parent 3364 e5403e2bf02c
child 3513 f589230fa21b
equal deleted inserted replaced
3489:aedf289192f5 3490:016b3172b645
   171 }
   171 }
   172 
   172 
   173 
   173 
   174 #pragma mark -
   174 #pragma mark -
   175 #pragma mark Memory management
   175 #pragma mark Memory management
   176 - (void)didReceiveMemoryWarning {
   176 -(void) didReceiveMemoryWarning {
   177     openal_stopsound(voiceBeingPlayed);
   177     openal_stopsound(voiceBeingPlayed);
   178     openal_freesound(voiceBeingPlayed);
   178     openal_freesound(voiceBeingPlayed);
   179     voiceBeingPlayed = -1;
   179     voiceBeingPlayed = -1;
   180     // Releases the view if it doesn't have a superview.
   180     // Releases the view if it doesn't have a superview.
   181     [super didReceiveMemoryWarning];
   181     [super didReceiveMemoryWarning];
   182     // Relinquish ownership any cached data, images, etc that aren't in use.
   182     // Relinquish ownership any cached data, images, etc that aren't in use.
   183 }
   183 }
   184 
   184 
   185 - (void)viewDidUnload {
   185 -(void) viewDidUnload {
   186     [super viewDidUnload];
       
   187 
       
   188     openal_close();
   186     openal_close();
   189     voiceBeingPlayed = -1;
   187     voiceBeingPlayed = -1;
   190     self.lastIndexPath = nil;
   188     self.lastIndexPath = nil;
   191     self.teamDictionary = nil;
   189     self.teamDictionary = nil;
   192     self.voiceArray = nil;
   190     self.voiceArray = nil;
   193 }
   191     [super viewDidUnload];
   194 
   192     MSG_DIDUNLOAD();
   195 - (void)dealloc {
   193 }
       
   194 
       
   195 -(void) dealloc {
   196     [voiceArray release];
   196     [voiceArray release];
   197     [teamDictionary release];
   197     [teamDictionary release];
   198     [lastIndexPath release];
   198     [lastIndexPath release];
   199     [super dealloc];
   199     [super dealloc];
   200 }
   200 }