summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macosx/HBLanguagesSelection.m17
-rw-r--r--macosx/HBSubtitlesDefaultsController.m1
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"];