Commit 0a59bb70 authored by Felix Paul Kühne's avatar Felix Paul Kühne

iOS dialog provider: fix retain cycle

parent 4f70ea7d
...@@ -226,6 +226,7 @@ static int DisplayLogin(vlc_object_t *p_this, const char *type, vlc_value_t prev ...@@ -226,6 +226,7 @@ static int DisplayLogin(vlc_object_t *p_this, const char *type, vlc_value_t prev
[dict setObject:@(no) forKey:@"no"]; [dict setObject:@(no) forKey:@"no"];
if (cancel) if (cancel)
[dict setObject:@(cancel) forKey:@"cancel"]; [dict setObject:@(cancel) forKey:@"cancel"];
[dict retain];
return dict; return dict;
} }
...@@ -238,6 +239,7 @@ static int DisplayLogin(vlc_object_t *p_this, const char *type, vlc_value_t prev ...@@ -238,6 +239,7 @@ static int DisplayLogin(vlc_object_t *p_this, const char *type, vlc_value_t prev
VLCBlockingAlertView *alert = [[VLCBlockingAlertView alloc] initWithTitle:[dialog objectForKey:@"title"] message:[dialog objectForKey:@"message"] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; VLCBlockingAlertView *alert = [[VLCBlockingAlertView alloc] initWithTitle:[dialog objectForKey:@"title"] message:[dialog objectForKey:@"message"] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
alert.completion = ^(BOOL cancelled, NSInteger buttonIndex) { alert.completion = ^(BOOL cancelled, NSInteger buttonIndex) {
[alert release]; [alert release];
[dialog release];
}; };
[alert show]; [alert show];
} }
...@@ -249,6 +251,7 @@ static int DisplayLogin(vlc_object_t *p_this, const char *type, vlc_value_t prev ...@@ -249,6 +251,7 @@ static int DisplayLogin(vlc_object_t *p_this, const char *type, vlc_value_t prev
VLCBlockingAlertView *alert = [[VLCBlockingAlertView alloc] initWithTitle:[dialog objectForKey:@"title"] message:[dialog objectForKey:@"message"] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil]; VLCBlockingAlertView *alert = [[VLCBlockingAlertView alloc] initWithTitle:[dialog objectForKey:@"title"] message:[dialog objectForKey:@"message"] delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
alert.completion = ^(BOOL cancelled, NSInteger buttonIndex) { alert.completion = ^(BOOL cancelled, NSInteger buttonIndex) {
[alert release]; [alert release];
[dialog release];
}; };
[alert show]; [alert show];
} }
...@@ -276,6 +279,7 @@ static int DisplayLogin(vlc_object_t *p_this, const char *type, vlc_value_t prev ...@@ -276,6 +279,7 @@ static int DisplayLogin(vlc_object_t *p_this, const char *type, vlc_value_t prev
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER); dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
[alert release]; [alert release];
[dialog release];
return @(ret); return @(ret);
} }
...@@ -309,6 +313,7 @@ static int DisplayLogin(vlc_object_t *p_this, const char *type, vlc_value_t prev ...@@ -309,6 +313,7 @@ static int DisplayLogin(vlc_object_t *p_this, const char *type, vlc_value_t prev
dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER); dispatch_semaphore_wait(sema, DISPATCH_TIME_FOREVER);
[alert release]; [alert release];
[dialog release];
return dict; return dict;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment