diff --git a/shell/platform/darwin/ios/framework/Source/FlutterObservatoryPublisher.mm b/shell/platform/darwin/ios/framework/Source/FlutterObservatoryPublisher.mm index 5af43f0cadf73..d73c0e76ac495 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterObservatoryPublisher.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterObservatoryPublisher.mm @@ -91,7 +91,7 @@ - (void)stopService { - (void)publishServiceProtocolPort:(NSString*)uri { // uri comes in as something like 'http://127.0.0.1:XXXXX/' where XXXXX is the port // number. - url.reset([[[NSURL alloc] initWithString:uri] retain]); + url.reset([[NSURL alloc] initWithString:uri]); DNSServiceFlags flags = kDNSServiceFlagsDefault; #if TARGET_IPHONE_SIMULATOR @@ -157,7 +157,7 @@ - (void)stopService { - (void)publishServiceProtocolPort:(NSString*)uri { // uri comes in as something like 'http://127.0.0.1:XXXXX/' where XXXXX is the port // number. - url.reset([[[NSURL alloc] initWithString:uri] retain]); + url.reset([[NSURL alloc] initWithString:uri]); NSNetService* netServiceTmp = [[NSNetService alloc] initWithDomain:@"local." type:@"_dartobservatory._tcp."