diff --git a/Plugins/APL/APL.xcodeproj/project.pbxproj b/Plugins/APL/APL.xcodeproj/project.pbxproj index 17fe755b2..68ed7ac7e 100644 --- a/Plugins/APL/APL.xcodeproj/project.pbxproj +++ b/Plugins/APL/APL.xcodeproj/project.pbxproj @@ -186,6 +186,7 @@ 1DEB913F08733D840010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -200,6 +201,7 @@ 1DEB914008733D840010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; CODE_SIGN_IDENTITY = "Developer ID Application"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_WARN_ABOUT_RETURN_TYPE = YES; diff --git a/Plugins/APL/APLDecoder.m b/Plugins/APL/APLDecoder.m index e00324831..948e59eaf 100644 --- a/Plugins/APL/APLDecoder.m +++ b/Plugins/APL/APLDecoder.m @@ -22,7 +22,7 @@ //Need to alter length [properties setObject:[NSNumber numberWithLong:trackLength] forKey:@"totalFrames"]; - return [properties autorelease]; + return properties; } - (BOOL)open:(id)s @@ -35,18 +35,15 @@ [s close]; apl = [APLFile createWithFile:[url path]]; - [apl retain]; //Kind of a hackish way of accessing outside classes. source = [NSClassFromString(@"AudioSource") audioSourceForURL:[apl file]]; - [source retain]; if (![source open:[apl file]]) { ALog(@"Could not open source for file '%@' referenced in apl", [apl file]); return NO; } decoder = [NSClassFromString(@"AudioDecoder") audioDecoderForSource:source]; - [decoder retain]; if (![decoder open:source]) { ALog(@"Could not open decoder for source for apl"); @@ -80,18 +77,11 @@ - (void)close { if (decoder) { [decoder close]; - [decoder release]; decoder = nil; } - if (source) { - [source release]; - source = nil; - } - if (apl) { - [apl release]; - apl = nil; - } + source = nil; + apl = nil; } diff --git a/Plugins/APL/APLFile.m b/Plugins/APL/APLFile.m index b4e87c01f..8f68b26a4 100644 --- a/Plugins/APL/APLFile.m +++ b/Plugins/APL/APLFile.m @@ -39,7 +39,6 @@ [unixPath insertString:basePath atIndex:0]; } NSURL *url = [NSURL URLWithString:[[NSURL fileURLWithPath:unixPath] absoluteString]]; - [unixPath release]; return url; } @@ -59,7 +58,7 @@ ALog(@"Cannot read header"); return nil; } - NSString* str = [[[NSString alloc] autorelease] initWithData:da encoding: NSASCIIStringEncoding]; + NSString* str = [[NSString alloc] initWithData:da encoding: NSASCIIStringEncoding]; if([str compare:header options:NSCaseInsensitiveSearch]) { ALog(@"APL header mismatch"); return nil; @@ -71,7 +70,6 @@ while((line = [self readline:f])) { if (![line compare:@"----- APE TAG (DO NOT TOUCH!!!) -----\r\n" options:NSCaseInsensitiveSearch]) break; if([line characterAtIndex:0] == '-') break; - [scanner release]; scanner = [[NSScanner alloc] initWithString:line]; NSString* field = nil, *value = nil; if (![scanner scanUpToString:@"=" intoString:&field]) continue; @@ -79,7 +77,6 @@ if (![scanner scanUpToString:@"\r\n" intoString:&value]) continue; if (![field compare:@"Image File" options:NSCaseInsensitiveSearch]) { - [file release]; file = [self urlForPath:value relativeTo:filename]; DLog(@"APL refers to file '%@' read '%@'", file, value); continue; @@ -97,7 +94,6 @@ continue; } } - [scanner release]; //check here for EOF? cocoa does not have this functionality :( [f closeFile]; }