project_files/HedgewarsMobile/Classes/HedgewarsAppDelegate.m
changeset 6208 b831679e9467
parent 6078 8c0cc07731e5
child 6247 6dfad55fd71c
equal deleted inserted replaced
6207:cbc80c22691c 6208:b831679e9467
    88         [self.secondWindow makeKeyAndVisible];
    88         [self.secondWindow makeKeyAndVisible];
    89     }
    89     }
    90 }
    90 }
    91 
    91 
    92 -(void) applicationDidReceiveMemoryWarning:(UIApplication *)application {
    92 -(void) applicationDidReceiveMemoryWarning:(UIApplication *)application {
    93     // don't stop music when it is playing
    93     [HWUtils releaseCache];
       
    94     // don't stop music if it is playing
    94     if (self.isInGame) {
    95     if (self.isInGame) {
    95         [AudioManagerController cleanupMemory];
    96         [AudioManagerController releaseCache];
    96         MSG_MEMCLEAN();
       
    97     }
    97     }
       
    98     MSG_MEMCLEAN();
    98     // don't clean mainMenuViewController here!!!
    99     // don't clean mainMenuViewController here!!!
    99 }
   100 }
   100 
   101 
   101 // true multitasking with sdl works only on 4.2 and above; we close the game to avoid a black screen at return
   102 // true multitasking with sdl works only on 4.2 and above; we close the game to avoid a black screen at return
   102 -(void) applicationWillResignActive:(UIApplication *)application {
   103 -(void) applicationWillResignActive:(UIApplication *)application {