diff options
author | ritsuka <[email protected]> | 2014-08-04 07:05:06 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2014-08-04 07:05:06 +0000 |
commit | 49a49b9d4664b33dc3d7a723fe421a7b695e2052 (patch) | |
tree | f421cdb2596a2936e20ee67f55d17a2530746ad4 /macosx | |
parent | 997f5636668556f2b1c4ce71440cfef342396c1a (diff) |
MacGui: fixed a number of missing release.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6263 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/HBLanguagesSelection.m | 17 | ||||
-rw-r--r-- | macosx/HBSubtitlesDefaultsController.m | 1 |
2 files changed, 12 insertions, 6 deletions
diff --git a/macosx/HBLanguagesSelection.m b/macosx/HBLanguagesSelection.m index 9dac0883d..3bdb8ec61 100644 --- a/macosx/HBLanguagesSelection.m +++ b/macosx/HBLanguagesSelection.m @@ -22,8 +22,10 @@ - (void)dealloc { - [super dealloc]; [_language release]; + [_iso639_2 release]; + + [super dealloc]; } @end @@ -43,8 +45,8 @@ { NSString *nativeLanguage = strlen(lang->native_name) ? @(lang->native_name) : @(lang->eng_name); - HBLang *item = [[[HBLang alloc] initWithLanguage:nativeLanguage - iso639_2code:@(lang->iso639_2)] autorelease]; + HBLang *item = [[HBLang alloc] initWithLanguage:nativeLanguage + iso639_2code:@(lang->iso639_2)]; if ([languages containsObject:item.iso639_2]) { item.isSelected = YES; @@ -54,6 +56,8 @@ { [internal addObject:item]; } + + [item release]; } // Add the (Any) item. @@ -97,8 +101,9 @@ - (void)dealloc { - [super dealloc]; [_languagesArray release]; + + [super dealloc]; } @end @@ -170,7 +175,7 @@ NSString *kHBLanguagesDragRowsType = @"kHBLanguagesDragRowsType"; NSUInteger currentIndex = [rowIndexes firstIndex]; while (currentIndex != NSNotFound) { - NSUInteger newIndex = [unfilteredArray indexOfObject:[filteredArray objectAtIndex:currentIndex]]; + NSUInteger newIndex = [unfilteredArray indexOfObject:filteredArray[currentIndex]]; [unfilteredIndexes addIndex:newIndex]; currentIndex = [rowIndexes indexGreaterThanIndex:currentIndex]; } @@ -183,7 +188,7 @@ NSString *kHBLanguagesDragRowsType = @"kHBLanguagesDragRowsType"; data = [NSKeyedArchiver archivedDataWithRootObject:rowIndexes]; } - [pboard declareTypes:[NSArray arrayWithObject:kHBLanguagesDragRowsType] owner:self]; + [pboard declareTypes:@[kHBLanguagesDragRowsType] owner:self]; [pboard setData:data forType:kHBLanguagesDragRowsType]; } diff --git a/macosx/HBSubtitlesDefaultsController.m b/macosx/HBSubtitlesDefaultsController.m index e19c18aa2..cef2be1d7 100644 --- a/macosx/HBSubtitlesDefaultsController.m +++ b/macosx/HBSubtitlesDefaultsController.m @@ -80,6 +80,7 @@ static void *HBSubtitlesDefaultsContex = &HBSubtitlesDefaultsContex; - (void)dealloc { [_settings release]; + [_languagesList release]; @try { [self removeObserver:self forKeyPath:@"tableController.showSelectedOnly"]; |