From bfce29ca8e656fe61028495e21f8465275f2eb30 Mon Sep 17 00:00:00 2001 From: ColdPaleLight <31977171+ColdPaleLight@users.noreply.github.com> Date: Fri, 27 Aug 2021 04:21:01 +0800 Subject: [PATCH] Fix memory leak in FlutterSwitchSemanticsObject (flutter/engine#28065) --- .../platform/darwin/ios/framework/Source/SemanticsObject.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/SemanticsObject.mm b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/SemanticsObject.mm index 6d30c34d1a4..50ff757c515 100644 --- a/engine/src/flutter/shell/platform/darwin/ios/framework/Source/SemanticsObject.mm +++ b/engine/src/flutter/shell/platform/darwin/ios/framework/Source/SemanticsObject.mm @@ -100,7 +100,7 @@ CGRect ConvertRectToGlobal(SemanticsObject* reference, CGRect local_rect) { uid:(int32_t)uid { self = [super initWithBridge:bridge uid:uid]; if (self) { - _nativeSwitch = [[[UISwitch alloc] init] retain]; + _nativeSwitch = [[UISwitch alloc] init]; } return self; }