From 49a49b9d4664b33dc3d7a723fe421a7b695e2052 Mon Sep 17 00:00:00 2001 From: ritsuka Date: Mon, 4 Aug 2014 07:05:06 +0000 Subject: MacGui: fixed a number of missing release. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6263 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- macosx/HBLanguagesSelection.m | 17 +++++++++++------ macosx/HBSubtitlesDefaultsController.m | 1 + 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'macosx') 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"]; -- cgit v1.2.3