project_files/HedgewarsMobile/Classes/MXAudioPlayerFadeOperation.m
branchios-revival
changeset 11137 14f50dde3e8c
parent 8441 a00b0fa0dbd7
child 12877 00215a7ec5f5
--- a/project_files/HedgewarsMobile/Classes/MXAudioPlayerFadeOperation.m	Tue Aug 18 00:51:23 2015 +0200
+++ b/project_files/HedgewarsMobile/Classes/MXAudioPlayerFadeOperation.m	Tue Aug 18 01:08:21 2015 +0200
@@ -79,7 +79,8 @@
 }
 
 - (void)main {
-  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+  @autoreleasepool {
+
   [NSThread sleepForTimeInterval:_delay];
   if ([self.audioPlayer isKindOfClass:[AVAudioPlayer class]]) {
     [self beginFadeOperation];
@@ -88,7 +89,7 @@
     ALog(@"AudioPlayerFadeOperation began with invalid AVAudioPlayer");
   }
 
-  [pool release];
+  }
 }
 
 - (void)beginFadeOperation {