diff options
author | ritsuka <[email protected]> | 2015-03-17 13:56:21 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2015-03-17 13:56:21 +0000 |
commit | 48a9e546878ae074202e0301f428193b7915d68f (patch) | |
tree | cf3f0f270fc8c7430dec870e954c826926c02a60 /macosx/HBLanguagesSelection.m | |
parent | 220bd888e05696acbe1dd47f96ded78c389fc27f (diff) |
MacGui: convert the mac gui to Objective-C ARC.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6996 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBLanguagesSelection.m')
-rw-r--r-- | macosx/HBLanguagesSelection.m | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/macosx/HBLanguagesSelection.m b/macosx/HBLanguagesSelection.m index 7e9ad62ac..f848f9a10 100644 --- a/macosx/HBLanguagesSelection.m +++ b/macosx/HBLanguagesSelection.m @@ -14,8 +14,8 @@ self = [super init]; if (self) { - _language = [value retain]; - _iso639_2 = [code retain]; + _language = value; + _iso639_2 = code; } return self; } @@ -25,20 +25,12 @@ HBLang *lang = [[self class] allocWithZone:zone]; lang->_isSelected = self.isSelected; - lang->_language = [self.language retain]; - lang->_iso639_2 = [self.iso639_2 retain]; + lang->_language = self.language; + lang->_iso639_2 = self.iso639_2; return lang; } -- (void)dealloc -{ - [_language release]; - [_iso639_2 release]; - - [super dealloc]; -} - - (NSString *)description { return self.language; @@ -79,12 +71,11 @@ [internal addObject:item]; } - [item release]; } // Add the (Any) item. - HBLang *item = [[[HBLang alloc] initWithLanguage:@"(Any)" - iso639_2code:@"und"] autorelease]; + HBLang *item = [[HBLang alloc] initWithLanguage:@"(Any)" + iso639_2code:@"und"]; if ([languages containsObject:item.iso639_2]) { item.isSelected = YES; @@ -99,7 +90,6 @@ [internal insertObjects:selected atIndexes:[NSIndexSet indexSetWithIndexesInRange:(NSMakeRange(1, selected.count))]]; - [selected release]; _languagesArray = internal; } @@ -109,7 +99,7 @@ - (NSArray *)selectedLanguages { - NSMutableArray *selected = [[[NSMutableArray alloc] init] autorelease]; + NSMutableArray *selected = [[NSMutableArray alloc] init]; for (HBLang *lang in self.languagesArray) { if (lang.isSelected) @@ -118,15 +108,9 @@ } } - return [[selected copy] autorelease]; + return [selected copy]; } -- (void)dealloc -{ - [_languagesArray release]; - - [super dealloc]; -} @end @@ -203,7 +187,6 @@ NSString *kHBLanguagesDragRowsType = @"kHBLanguagesDragRowsType"; } data = [NSKeyedArchiver archivedDataWithRootObject:unfilteredIndexes]; - [filteredArray release]; } else { @@ -290,10 +273,8 @@ NSString *kHBLanguagesDragRowsType = @"kHBLanguagesDragRowsType"; id object = objects[removeIndex]; // Move the object - [object retain]; [self removeObjectAtArrangedObjectIndex:removeIndex]; [self insertObject:object atArrangedObjectIndex:insertIndex]; - [object release]; thisIndex = [indexSet indexLessThanIndex:thisIndex]; } |