project_files/HedgewarsMobile/Classes/MXAudioPlayerFadeOperation.m
branchqmlfrontend
changeset 11408 b894922d58cc
parent 11137 14f50dde3e8c
child 12877 00215a7ec5f5
--- a/project_files/HedgewarsMobile/Classes/MXAudioPlayerFadeOperation.m	Tue Sep 08 19:20:58 2015 +0300
+++ b/project_files/HedgewarsMobile/Classes/MXAudioPlayerFadeOperation.m	Mon Nov 16 22:57:24 2015 +0300
@@ -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 {