From 06b81e9f3a29ccd1e6a045c8703ac69eaaf44572 Mon Sep 17 00:00:00 2001 From: Wu Zhong Date: Fri, 10 Jan 2020 10:08:03 +0800 Subject: [PATCH] Fixes leak of url in FlutterObservatoryPublisher (flutter/engine#14822) --- .../ios/framework/Source/FlutterObservatoryPublisher.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterObservatoryPublisher.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterObservatoryPublisher.mm index 5af43f0cadf..d73c0e76ac4 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterObservatoryPublisher.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/FlutterObservatoryPublisher.mm @@ -91,7 +91,7 @@ - (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 @@ static void DNSSD_API registrationCallback(DNSServiceRef sdRef, - (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."