project_files/HedgewarsMobile/Classes/AudioManagerController.m
changeset 6017 24631fd2fb9e
parent 6006 a211dcca5016
child 6208 b831679e9467
equal deleted inserted replaced
6016:85410eef7ba4 6017:24631fd2fb9e
   106     AudioServicesPlaySystemSound(selSound);
   106     AudioServicesPlaySystemSound(selSound);
   107 }
   107 }
   108 
   108 
   109 #pragma mark -
   109 #pragma mark -
   110 #pragma mark memory management
   110 #pragma mark memory management
   111 +(void) didReceiveMemoryWarning {
   111 +(void) cleanupMemory {
   112     [backgroundMusic stop];
   112     [backgroundMusic stop];
   113     backgroundMusic = nil;
   113     [backgroundMusic release], backgroundMusic = nil;
   114     clickSound = -1;
       
   115     backSound = -1;
       
   116 }
       
   117 
       
   118 +(void) dealloc {
       
   119     releaseAndNil(backgroundMusic);
       
   120     AudioServicesDisposeSystemSoundID(clickSound), clickSound = -1;
   114     AudioServicesDisposeSystemSoundID(clickSound), clickSound = -1;
   121     AudioServicesDisposeSystemSoundID(backSound), backSound = -1;
   115     AudioServicesDisposeSystemSoundID(backSound), backSound = -1;
   122     AudioServicesDisposeSystemSoundID(selSound), selSound = -1;
   116     AudioServicesDisposeSystemSoundID(selSound), selSound = -1;
   123     [super dealloc];
   117     MSG_MEMCLEAN();
   124 }
   118 }
   125 
   119 
   126 @end
   120 @end