From 92d3dd18a0960ea362a2d6b594ba55d74d542007 Mon Sep 17 00:00:00 2001 From: zhongwuzw Date: Fri, 27 Dec 2019 17:27:17 +0800 Subject: [PATCH 1/2] Fixes leak of url in FlutterObservatoryPublisher --- .../darwin/ios/framework/Source/FlutterObservatoryPublisher.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterObservatoryPublisher.mm b/shell/platform/darwin/ios/framework/Source/FlutterObservatoryPublisher.mm index 5af43f0cadf73..f3828272d1712 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 From c16d8136253b0e9858dd8cf65cc1f2be469ddae6 Mon Sep 17 00:00:00 2001 From: zhongwuzw Date: Fri, 27 Dec 2019 20:05:00 +0800 Subject: [PATCH 2/2] The same --- .../darwin/ios/framework/Source/FlutterObservatoryPublisher.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/platform/darwin/ios/framework/Source/FlutterObservatoryPublisher.mm b/shell/platform/darwin/ios/framework/Source/FlutterObservatoryPublisher.mm index f3828272d1712..d73c0e76ac495 100644 --- a/shell/platform/darwin/ios/framework/Source/FlutterObservatoryPublisher.mm +++ b/shell/platform/darwin/ios/framework/Source/FlutterObservatoryPublisher.mm @@ -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."